]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/api/videos/blacklist.ts
add operationId doc middleware to so API endpoints
[github/Chocobozzz/PeerTube.git] / server / controllers / api / videos / blacklist.ts
index ca2b85ea5bb5a8aa0e3eef24ac247f5fad7a2ecf..530e179656e98a71163bc994502a7cf175037d2a 100644 (file)
@@ -9,6 +9,7 @@ import {
   authenticate,
   blacklistSortValidator,
   ensureUserHasRight,
+  openapiOperationDoc,
   paginationValidator,
   setBlacklistSort,
   setDefaultPagination,
@@ -23,6 +24,7 @@ import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-c
 const blacklistRouter = express.Router()
 
 blacklistRouter.post('/:videoId/blacklist',
+  openapiOperationDoc({ operationId: 'addVideoBlock' }),
   authenticate,
   ensureUserHasRight(UserRight.MANAGE_VIDEO_BLACKLIST),
   asyncMiddleware(videosBlacklistAddValidator),
@@ -30,6 +32,7 @@ blacklistRouter.post('/:videoId/blacklist',
 )
 
 blacklistRouter.get('/blacklist',
+  openapiOperationDoc({ operationId: 'getVideoBlocks' }),
   authenticate,
   ensureUserHasRight(UserRight.MANAGE_VIDEO_BLACKLIST),
   paginationValidator,
@@ -48,6 +51,7 @@ blacklistRouter.put('/:videoId/blacklist',
 )
 
 blacklistRouter.delete('/:videoId/blacklist',
+  openapiOperationDoc({ operationId: 'delVideoBlock' }),
   authenticate,
   ensureUserHasRight(UserRight.MANAGE_VIDEO_BLACKLIST),
   asyncMiddleware(videosBlacklistRemoveValidator),