|
|
|
|
@@ -33,9 +33,6 @@ var sessionStore = new MySQLStore({
|
|
|
|
|
const mockDataDay = require('./mockdata-test/day.json');
|
|
|
|
|
const mockDataWeek = require('./mockdata-test/week.json');
|
|
|
|
|
const mockDataMonth = require('./mockdata-test/month.json');
|
|
|
|
|
//const mockAmountDataDay = require('./mockdata-test/amountDay.json');
|
|
|
|
|
//const mockAmountDataWeek = require('./mockdata-test/amountWeek.json');
|
|
|
|
|
//const mockAmountDataMonth = require('./mockdata-test/amountMonth.json');
|
|
|
|
|
var resourceList;
|
|
|
|
|
const saltRounds = 13;
|
|
|
|
|
|
|
|
|
|
@@ -233,7 +230,7 @@ app.get('/API/amount/day', function (req, res) {
|
|
|
|
|
const kind = parseInt(req.query.kind);
|
|
|
|
|
if (Number.isInteger(kind)) {
|
|
|
|
|
//Mock Data:
|
|
|
|
|
if (kind === -1 || DEBUG) return res.send(mockAmountDataDay);
|
|
|
|
|
if (kind === -1 || DEBUG) return res.send(mockDataDay);
|
|
|
|
|
|
|
|
|
|
if (kind >= 1 && kind <= 113) {
|
|
|
|
|
var dayend = new Date().toMysqlFormat();
|
|
|
|
|
@@ -293,7 +290,7 @@ app.get('/API/amount/week', function (req, res) {
|
|
|
|
|
const kind = parseInt(req.query.kind);
|
|
|
|
|
if (Number.isInteger(kind)) {
|
|
|
|
|
//Mock Data:
|
|
|
|
|
if (kind === -1 || DEBUG) return res.send(mockAmountDataWeek);
|
|
|
|
|
if (kind === -1 || DEBUG) return res.send(mockDataWeek);
|
|
|
|
|
|
|
|
|
|
if (kind >= 1 && kind <= 113) {
|
|
|
|
|
var day = new Date();
|
|
|
|
|
@@ -326,7 +323,7 @@ app.get('/API/price/month', function (req, res) {
|
|
|
|
|
const kind = parseInt(req.query.kind);
|
|
|
|
|
if (Number.isInteger(kind)) {
|
|
|
|
|
//Mock Data:
|
|
|
|
|
if (kind === -1 || DEBUG) return res.send(mockAmountDataMonth);
|
|
|
|
|
if (kind === -1 || DEBUG) return res.send(mockDataMonth);
|
|
|
|
|
|
|
|
|
|
if (kind >= 1 && kind <= 113) {
|
|
|
|
|
var day = new Date();
|
|
|
|
|
|