diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2021-06-04 08:57:07 +0200 |
---|---|---|
committer | Rigel Kent <sendmemail@rigelk.eu> | 2021-06-04 09:21:46 +0200 |
commit | 1c627fd8d2e60d4d790353886006485343d70084 (patch) | |
tree | 384fcd80a018eab2ace2a340d028b23359c07dc7 /server/controllers/api/videos/update.ts | |
parent | b96d21b744f3b0714636bd43e7f39fb33c3adb73 (diff) | |
download | PeerTube-1c627fd8d2e60d4d790353886006485343d70084.tar.gz PeerTube-1c627fd8d2e60d4d790353886006485343d70084.tar.zst PeerTube-1c627fd8d2e60d4d790353886006485343d70084.zip |
refactor docMiddleware to support operationId-only form
Diffstat (limited to 'server/controllers/api/videos/update.ts')
-rw-r--r-- | server/controllers/api/videos/update.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/api/videos/update.ts b/server/controllers/api/videos/update.ts index 09e584d30..8affe71c6 100644 --- a/server/controllers/api/videos/update.ts +++ b/server/controllers/api/videos/update.ts | |||
@@ -20,7 +20,7 @@ import { autoBlacklistVideoIfNeeded } from '../../../lib/video-blacklist' | |||
20 | import { asyncMiddleware, asyncRetryTransactionMiddleware, authenticate, videosUpdateValidator } from '../../../middlewares' | 20 | import { asyncMiddleware, asyncRetryTransactionMiddleware, authenticate, videosUpdateValidator } from '../../../middlewares' |
21 | import { ScheduleVideoUpdateModel } from '../../../models/video/schedule-video-update' | 21 | import { ScheduleVideoUpdateModel } from '../../../models/video/schedule-video-update' |
22 | import { VideoModel } from '../../../models/video/video' | 22 | import { VideoModel } from '../../../models/video/video' |
23 | import { docMiddleware } from '@server/middlewares/doc' | 23 | import { openapiOperationDoc } from '@server/middlewares/doc' |
24 | 24 | ||
25 | const lTags = loggerTagsFactory('api', 'video') | 25 | const lTags = loggerTagsFactory('api', 'video') |
26 | const auditLogger = auditLoggerFactory('videos') | 26 | const auditLogger = auditLoggerFactory('videos') |
@@ -36,7 +36,7 @@ const reqVideoFileUpdate = createReqFiles( | |||
36 | ) | 36 | ) |
37 | 37 | ||
38 | updateRouter.put('/:id', | 38 | updateRouter.put('/:id', |
39 | docMiddleware('https://docs.joinpeertube.org/api-rest-reference.html#operation/putVideo'), | 39 | openapiOperationDoc({ operationId: 'putVideo' }), |
40 | authenticate, | 40 | authenticate, |
41 | reqVideoFileUpdate, | 41 | reqVideoFileUpdate, |
42 | asyncMiddleware(videosUpdateValidator), | 42 | asyncMiddleware(videosUpdateValidator), |