aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/jobs.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2021-06-04 09:16:23 +0200
committerRigel Kent <sendmemail@rigelk.eu>2021-06-04 09:21:46 +0200
commit1333ab1f2d4ec495084c5368df25610683582ae3 (patch)
tree4d2b6f5b36d2acfacd5e5f6c3a9d35a9c7101658 /server/controllers/api/jobs.ts
parent1c627fd8d2e60d4d790353886006485343d70084 (diff)
downloadPeerTube-1333ab1f2d4ec495084c5368df25610683582ae3.tar.gz
PeerTube-1333ab1f2d4ec495084c5368df25610683582ae3.tar.zst
PeerTube-1333ab1f2d4ec495084c5368df25610683582ae3.zip
add operationId doc middleware to so API endpoints
Diffstat (limited to 'server/controllers/api/jobs.ts')
-rw-r--r--server/controllers/api/jobs.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/controllers/api/jobs.ts b/server/controllers/api/jobs.ts
index d7cee1605..9e333322b 100644
--- a/server/controllers/api/jobs.ts
+++ b/server/controllers/api/jobs.ts
@@ -9,6 +9,7 @@ import {
9 authenticate, 9 authenticate,
10 ensureUserHasRight, 10 ensureUserHasRight,
11 jobsSortValidator, 11 jobsSortValidator,
12 openapiOperationDoc,
12 paginationValidatorBuilder, 13 paginationValidatorBuilder,
13 setDefaultPagination, 14 setDefaultPagination,
14 setDefaultSort 15 setDefaultSort
@@ -18,6 +19,7 @@ import { listJobsValidator } from '../../middlewares/validators/jobs'
18const jobsRouter = express.Router() 19const jobsRouter = express.Router()
19 20
20jobsRouter.get('/:state?', 21jobsRouter.get('/:state?',
22 openapiOperationDoc({ operationId: 'getJobs' }),
21 authenticate, 23 authenticate,
22 ensureUserHasRight(UserRight.MANAGE_JOBS), 24 ensureUserHasRight(UserRight.MANAGE_JOBS),
23 paginationValidatorBuilder([ 'jobs' ]), 25 paginationValidatorBuilder([ 'jobs' ]),