aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/videos')
-rw-r--r--server/controllers/api/videos/blacklist.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/controllers/api/videos/blacklist.ts b/server/controllers/api/videos/blacklist.ts
index ca2b85ea5..530e17965 100644
--- a/server/controllers/api/videos/blacklist.ts
+++ b/server/controllers/api/videos/blacklist.ts
@@ -9,6 +9,7 @@ import {
9 authenticate, 9 authenticate,
10 blacklistSortValidator, 10 blacklistSortValidator,
11 ensureUserHasRight, 11 ensureUserHasRight,
12 openapiOperationDoc,
12 paginationValidator, 13 paginationValidator,
13 setBlacklistSort, 14 setBlacklistSort,
14 setDefaultPagination, 15 setDefaultPagination,
@@ -23,6 +24,7 @@ import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-c
23const blacklistRouter = express.Router() 24const blacklistRouter = express.Router()
24 25
25blacklistRouter.post('/:videoId/blacklist', 26blacklistRouter.post('/:videoId/blacklist',
27 openapiOperationDoc({ operationId: 'addVideoBlock' }),
26 authenticate, 28 authenticate,
27 ensureUserHasRight(UserRight.MANAGE_VIDEO_BLACKLIST), 29 ensureUserHasRight(UserRight.MANAGE_VIDEO_BLACKLIST),
28 asyncMiddleware(videosBlacklistAddValidator), 30 asyncMiddleware(videosBlacklistAddValidator),
@@ -30,6 +32,7 @@ blacklistRouter.post('/:videoId/blacklist',
30) 32)
31 33
32blacklistRouter.get('/blacklist', 34blacklistRouter.get('/blacklist',
35 openapiOperationDoc({ operationId: 'getVideoBlocks' }),
33 authenticate, 36 authenticate,
34 ensureUserHasRight(UserRight.MANAGE_VIDEO_BLACKLIST), 37 ensureUserHasRight(UserRight.MANAGE_VIDEO_BLACKLIST),
35 paginationValidator, 38 paginationValidator,
@@ -48,6 +51,7 @@ blacklistRouter.put('/:videoId/blacklist',
48) 51)
49 52
50blacklistRouter.delete('/:videoId/blacklist', 53blacklistRouter.delete('/:videoId/blacklist',
54 openapiOperationDoc({ operationId: 'delVideoBlock' }),
51 authenticate, 55 authenticate,
52 ensureUserHasRight(UserRight.MANAGE_VIDEO_BLACKLIST), 56 ensureUserHasRight(UserRight.MANAGE_VIDEO_BLACKLIST),
53 asyncMiddleware(videosBlacklistRemoveValidator), 57 asyncMiddleware(videosBlacklistRemoveValidator),