Merge pull request 'add mockdata for week API endpoint' (#59) from add-weekfunction-for-backend into master
All checks were successful
SimcoDash/simcompanies-dashboard/pipeline/head This commit looks good

Reviewed-by: falk <falk.ba@gmx.de>
This commit was merged in pull request #59.
This commit is contained in:
2020-05-13 20:51:41 +02:00
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;
@@ -212,7 +213,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