From c756bae079e02873f6433582ca14a092fec0db27 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Sun, 6 Jun 2021 10:21:06 +0200 Subject: add video upload types, add doc middleware to more routes --- server/controllers/api/videos/watching.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'server/controllers/api/videos/watching.ts') diff --git a/server/controllers/api/videos/watching.ts b/server/controllers/api/videos/watching.ts index 08190e583..8b15525aa 100644 --- a/server/controllers/api/videos/watching.ts +++ b/server/controllers/api/videos/watching.ts @@ -1,12 +1,19 @@ import * as express from 'express' import { UserWatchingVideo } from '../../../../shared' -import { asyncMiddleware, asyncRetryTransactionMiddleware, authenticate, videoWatchingValidator } from '../../../middlewares' +import { + asyncMiddleware, + asyncRetryTransactionMiddleware, + authenticate, + openapiOperationDoc, + videoWatchingValidator +} from '../../../middlewares' import { UserVideoHistoryModel } from '../../../models/user/user-video-history' import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' const watchingRouter = express.Router() watchingRouter.put('/:videoId/watching', + openapiOperationDoc({ operationId: 'setProgress' }), authenticate, asyncMiddleware(videoWatchingValidator), asyncRetryTransactionMiddleware(userWatchVideo) -- cgit v1.2.3