From 6c174948f8d67deee1c864aef740c065ff47d076 Mon Sep 17 00:00:00 2001 From: Oliver Boehlk Date: Fri, 29 May 2020 19:42:42 +0200 Subject: [PATCH] prepare for new mockdata --- backend/index.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/backend/index.js b/backend/index.js index 8b8ed01..6df4525 100644 --- a/backend/index.js +++ b/backend/index.js @@ -33,6 +33,9 @@ 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; @@ -230,7 +233,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(mockDataDay); + if (kind === -1 || DEBUG) return res.send(mockAmountDataDay); if (kind >= 1 && kind <= 113) { var dayend = new Date().toMysqlFormat(); @@ -290,7 +293,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(mockDataWeek); + if (kind === -1 || DEBUG) return res.send(mockAmountDataWeek); if (kind >= 1 && kind <= 113) { var day = new Date(); @@ -323,7 +326,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(mockDataMonth); + if (kind === -1 || DEBUG) return res.send(mockAmountDataMonth); if (kind >= 1 && kind <= 113) { var day = new Date();