aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-06-16 10:36:18 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-06-16 10:36:18 +0200
commitee9e7b61f59a427208386738057c8eff48fba599 (patch)
tree9097de886128e15f21f0b5920a2076d16a087467 /server/controllers/api
parent70c065d64c330196d371941d9294a55da6e3aa37 (diff)
downloadPeerTube-ee9e7b61f59a427208386738057c8eff48fba599.tar.gz
PeerTube-ee9e7b61f59a427208386738057c8eff48fba599.tar.zst
PeerTube-ee9e7b61f59a427208386738057c8eff48fba599.zip
Create types for model enums
Diffstat (limited to 'server/controllers/api')
-rw-r--r--server/controllers/api/requests.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/controllers/api/requests.ts b/server/controllers/api/requests.ts
index d3f0d958c..5718b59b7 100644
--- a/server/controllers/api/requests.ts
+++ b/server/controllers/api/requests.ts
@@ -8,6 +8,7 @@ import {
8 getRequestVideoEventScheduler 8 getRequestVideoEventScheduler
9} from '../../lib' 9} from '../../lib'
10import { authenticate, ensureIsAdmin } from '../../middlewares' 10import { authenticate, ensureIsAdmin } from '../../middlewares'
11import { RequestSchedulerAttributes } from '../../../shared'
11 12
12const requestsRouter = express.Router() 13const requestsRouter = express.Router()
13 14
@@ -44,7 +45,7 @@ function buildRequestSchedulerFunction (requestScheduler: AbstractRequestSchedul
44 requestScheduler.remainingRequestsCount(function (err, count) { 45 requestScheduler.remainingRequestsCount(function (err, count) {
45 if (err) return callback(err) 46 if (err) return callback(err)
46 47
47 const result = { 48 const result: RequestSchedulerAttributes = {
48 totalRequests: count, 49 totalRequests: count,
49 requestsLimitPods: requestScheduler.limitPods, 50 requestsLimitPods: requestScheduler.limitPods,
50 requestsLimitPerPod: requestScheduler.limitPerPod, 51 requestsLimitPerPod: requestScheduler.limitPerPod,