aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/requests.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-06-10 22:15:25 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-06-10 22:15:25 +0200
commit69818c9394366b954b6ba3bd697bd9d2b09f2a16 (patch)
treead199a18ec3c322460d6f9523fc383ee562554e0 /server/controllers/api/requests.ts
parent4d4e5cd4dca78480ec7f40e747f424cd107376a4 (diff)
downloadPeerTube-69818c9394366b954b6ba3bd697bd9d2b09f2a16.tar.gz
PeerTube-69818c9394366b954b6ba3bd697bd9d2b09f2a16.tar.zst
PeerTube-69818c9394366b954b6ba3bd697bd9d2b09f2a16.zip
Type functions
Diffstat (limited to 'server/controllers/api/requests.ts')
-rw-r--r--server/controllers/api/requests.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/controllers/api/requests.ts b/server/controllers/api/requests.ts
index ff4b4ac1a..2c18fe046 100644
--- a/server/controllers/api/requests.ts
+++ b/server/controllers/api/requests.ts
@@ -2,6 +2,7 @@ import * as express from 'express'
2import { parallel } from 'async' 2import { parallel } from 'async'
3 3
4import { 4import {
5 BaseRequestScheduler,
5 getRequestScheduler, 6 getRequestScheduler,
6 getRequestVideoQaduScheduler, 7 getRequestVideoQaduScheduler,
7 getRequestVideoEventScheduler 8 getRequestVideoEventScheduler
@@ -24,7 +25,7 @@ export {
24 25
25// --------------------------------------------------------------------------- 26// ---------------------------------------------------------------------------
26 27
27function getStatsRequests (req, res, next) { 28function getStatsRequests (req: express.Request, res: express.Response, next: express.NextFunction) {
28 parallel({ 29 parallel({
29 requestScheduler: buildRequestSchedulerFunction(getRequestScheduler()), 30 requestScheduler: buildRequestSchedulerFunction(getRequestScheduler()),
30 requestVideoQaduScheduler: buildRequestSchedulerFunction(getRequestVideoQaduScheduler()), 31 requestVideoQaduScheduler: buildRequestSchedulerFunction(getRequestVideoQaduScheduler()),
@@ -38,7 +39,7 @@ function getStatsRequests (req, res, next) {
38 39
39// --------------------------------------------------------------------------- 40// ---------------------------------------------------------------------------
40 41
41function buildRequestSchedulerFunction (requestScheduler) { 42function buildRequestSchedulerFunction (requestScheduler: BaseRequestScheduler) {
42 return function (callback) { 43 return function (callback) {
43 requestScheduler.remainingRequestsCount(function (err, count) { 44 requestScheduler.remainingRequestsCount(function (err, count) {
44 if (err) return callback(err) 45 if (err) return callback(err)