Compare commits
1 Commits
market-cap
...
new-mockda
| Author | SHA1 | Date | |
|---|---|---|---|
| 6c174948f8 |
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user