Syntax fixes

This commit is contained in:
Patrick McDonagh
2016-03-24 16:02:00 -05:00
parent a6d8b61e3c
commit 390ee390e4
2 changed files with 10 additions and 13 deletions

7
app.js
View File

@@ -1,5 +1,5 @@
var fileLocation = '/mnt/usb';
var DBTYPE = "SQLite"; // OR "MySQL"
var DBTYPE = 'SQLite'; // OR "MySQL"
var express = require('express'),
path = require('path'),
fs = require('fs'),
@@ -81,9 +81,6 @@ app.get('/json/latest', json.cardLatestX);
app.get('/json/all', json.allDates);
app.get('/json/between/:start/:end', json.findBetweenDateTime);
app.get('/json/byID/:date/:card_id', json.getCardByCardID);
app.get('/json/card/:id/surface', json.cardSurfaceOnly);
app.get('/json/card/:id/downhole', json.cardDownholeOnly);
app.get('/json/card/:id/data', json.cardDataOnly);
app.get('/json/card/:id', json.singleCard);
app.get('/csv/:id', json.cardCSV);
app.get('/json/status', json.status);

View File

@@ -1,13 +1,13 @@
/*jshint multistr: true */
/* jshint multistr: true */
var fileLocation = "/mnt/usb";
var dbFile = "/mnt/usb/testdata.db";
var fileLocation = '/mnt/usb'
var dbFile = '/mnt/usb/testdata.db'
//HELPER FUNCTIONS
var pad = function(num){
return ('0' + num.toString()).slice(-2);
};
var pocDateFormat = function(dtime){
// HELPER FUNCTIONS
var pad = function (num) {
return ('0' + num.toString()).slice(-2)
}
var pocDateFormat = function (dtime) {
//returns the date in the format YYYYMMDD from a date Object
var regexString = /(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2}).(\d*)/;
var dateParts = regexString.exec(dtime);