aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/v1
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-10-01 15:33:27 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-10-01 15:33:27 +0200
commit5abeec313f897bbb1f1f39c3849675ec9a77d506 (patch)
tree6ded96dd660e5427d28d05a6ed191687b0f79010 /server/controllers/api/v1
parent1ab844d8593fa84dfe65cad6b5bbf0e45efd7886 (diff)
downloadPeerTube-5abeec313f897bbb1f1f39c3849675ec9a77d506.tar.gz
PeerTube-5abeec313f897bbb1f1f39c3849675ec9a77d506.tar.zst
PeerTube-5abeec313f897bbb1f1f39c3849675ec9a77d506.zip
Server: fix remaining milli seconds before the next requests feature
Diffstat (limited to 'server/controllers/api/v1')
-rw-r--r--server/controllers/api/v1/requests.js4
1 files changed, 1 insertions, 3 deletions
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) {
28 Request.list(function (err, requests) { 28 Request.list(function (err, requests) {
29 if (err) return next(err) 29 if (err) return next(err)
30 30
31 const remainingMilliSeconds = constants.REQUESTS_INTERVAL - (Date.now() % constants.REQUESTS_INTERVAL)
32
33 return res.json({ 31 return res.json({
34 requests: requests, 32 requests: requests,
35 remainingMilliSeconds: remainingMilliSeconds, 33 remainingMilliSeconds: Request.remainingMilliSeconds(),
36 milliSecondsInterval: constants.REQUESTS_INTERVAL 34 milliSecondsInterval: constants.REQUESTS_INTERVAL
37 }) 35 })
38 }) 36 })