diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2021-06-04 09:16:23 +0200 |
---|---|---|
committer | Rigel Kent <sendmemail@rigelk.eu> | 2021-06-04 09:21:46 +0200 |
commit | 1333ab1f2d4ec495084c5368df25610683582ae3 (patch) | |
tree | 4d2b6f5b36d2acfacd5e5f6c3a9d35a9c7101658 /server/controllers/api/search.ts | |
parent | 1c627fd8d2e60d4d790353886006485343d70084 (diff) | |
download | PeerTube-1333ab1f2d4ec495084c5368df25610683582ae3.tar.gz PeerTube-1333ab1f2d4ec495084c5368df25610683582ae3.tar.zst PeerTube-1333ab1f2d4ec495084c5368df25610683582ae3.zip |
add operationId doc middleware to so API endpoints
Diffstat (limited to 'server/controllers/api/search.ts')
-rw-r--r-- | server/controllers/api/search.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/server/controllers/api/search.ts b/server/controllers/api/search.ts index a3b66b2a6..c975c5c3c 100644 --- a/server/controllers/api/search.ts +++ b/server/controllers/api/search.ts | |||
@@ -18,6 +18,7 @@ import { getOrCreateAPActor, loadActorUrlOrGetFromWebfinger } from '../../lib/ac | |||
18 | import { | 18 | import { |
19 | asyncMiddleware, | 19 | asyncMiddleware, |
20 | commonVideosFiltersValidator, | 20 | commonVideosFiltersValidator, |
21 | openapiOperationDoc, | ||
21 | optionalAuthenticate, | 22 | optionalAuthenticate, |
22 | paginationValidator, | 23 | paginationValidator, |
23 | setDefaultPagination, | 24 | setDefaultPagination, |
@@ -34,6 +35,7 @@ import { MChannelAccountDefault, MVideoAccountLightBlacklistAllFiles } from '../ | |||
34 | const searchRouter = express.Router() | 35 | const searchRouter = express.Router() |
35 | 36 | ||
36 | searchRouter.get('/videos', | 37 | searchRouter.get('/videos', |
38 | openapiOperationDoc({ operationId: 'searchVideos' }), | ||
37 | paginationValidator, | 39 | paginationValidator, |
38 | setDefaultPagination, | 40 | setDefaultPagination, |
39 | videosSearchSortValidator, | 41 | videosSearchSortValidator, |
@@ -45,6 +47,7 @@ searchRouter.get('/videos', | |||
45 | ) | 47 | ) |
46 | 48 | ||
47 | searchRouter.get('/video-channels', | 49 | searchRouter.get('/video-channels', |
50 | openapiOperationDoc({ operationId: 'searchChannels' }), | ||
48 | paginationValidator, | 51 | paginationValidator, |
49 | setDefaultPagination, | 52 | setDefaultPagination, |
50 | videoChannelsSearchSortValidator, | 53 | videoChannelsSearchSortValidator, |