add mockdata for week API endpoint

This commit is contained in:
2020-05-13 20:46:53 +02:00
parent c114ddd892
commit 2d03129996
2 changed files with 1114 additions and 1 deletions

View File

@@ -31,6 +31,7 @@ var sessionStore = new MySQLStore({
}, connection);
const mockDataDay = require('./mockdata-test/day.json');
const mockDataWeek = require('./mockdata-test/week.json');
var resourceList;
const saltRounds = 13;
@@ -207,7 +208,7 @@ app.get('/API/week', 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(mockDataWeek);
if (kind >= 1 && kind <= 113) {
var day = new Date();

File diff suppressed because it is too large Load Diff