From 5abeec313f897bbb1f1f39c3849675ec9a77d506 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Sat, 1 Oct 2016 15:33:27 +0200 Subject: Server: fix remaining milli seconds before the next requests feature --- server/controllers/api/v1/requests.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'server/controllers/api/v1') diff --git a/server/controllers/api/v1/requests.js b/server/controllers/api/v1/requests.js index 17aca8af0..9610e5cd6 100644 --- a/server/controllers/api/v1/requests.js +++ b/server/controllers/api/v1/requests.js @@ -28,11 +28,9 @@ function getStatsRequests (req, res, next) { Request.list(function (err, requests) { if (err) return next(err) - const remainingMilliSeconds = constants.REQUESTS_INTERVAL - (Date.now() % constants.REQUESTS_INTERVAL) - return res.json({ requests: requests, - remainingMilliSeconds: remainingMilliSeconds, + remainingMilliSeconds: Request.remainingMilliSeconds(), milliSecondsInterval: constants.REQUESTS_INTERVAL }) }) -- cgit v1.2.3