diff options
Diffstat (limited to 'server/middlewares/validators/videos/video-captions.ts')
-rw-r--r-- | server/middlewares/validators/videos/video-captions.ts | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/server/middlewares/validators/videos/video-captions.ts b/server/middlewares/validators/videos/video-captions.ts index fd6dd151a..72b2febc3 100644 --- a/server/middlewares/validators/videos/video-captions.ts +++ b/server/middlewares/validators/videos/video-captions.ts | |||
@@ -3,7 +3,6 @@ import { body, param } from 'express-validator' | |||
3 | import { UserRight } from '@shared/models' | 3 | import { UserRight } from '@shared/models' |
4 | import { isVideoCaptionFile, isVideoCaptionLanguageValid } from '../../../helpers/custom-validators/video-captions' | 4 | import { isVideoCaptionFile, isVideoCaptionLanguageValid } from '../../../helpers/custom-validators/video-captions' |
5 | import { cleanUpReqFiles } from '../../../helpers/express-utils' | 5 | import { cleanUpReqFiles } from '../../../helpers/express-utils' |
6 | import { logger } from '../../../helpers/logger' | ||
7 | import { CONSTRAINTS_FIELDS, MIMETYPES } from '../../../initializers/constants' | 6 | import { CONSTRAINTS_FIELDS, MIMETYPES } from '../../../initializers/constants' |
8 | import { | 7 | import { |
9 | areValidationErrors, | 8 | areValidationErrors, |
@@ -30,8 +29,6 @@ const addVideoCaptionValidator = [ | |||
30 | ), | 29 | ), |
31 | 30 | ||
32 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { | 31 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { |
33 | logger.debug('Checking addVideoCaption parameters', { parameters: req.body }) | ||
34 | |||
35 | if (areValidationErrors(req, res)) return cleanUpReqFiles(req) | 32 | if (areValidationErrors(req, res)) return cleanUpReqFiles(req) |
36 | if (!await doesVideoExist(req.params.videoId, res)) return cleanUpReqFiles(req) | 33 | if (!await doesVideoExist(req.params.videoId, res)) return cleanUpReqFiles(req) |
37 | 34 | ||
@@ -50,8 +47,6 @@ const deleteVideoCaptionValidator = [ | |||
50 | .custom(isVideoCaptionLanguageValid).not().isEmpty().withMessage('Should have a valid caption language'), | 47 | .custom(isVideoCaptionLanguageValid).not().isEmpty().withMessage('Should have a valid caption language'), |
51 | 48 | ||
52 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { | 49 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { |
53 | logger.debug('Checking deleteVideoCaption parameters', { parameters: req.params }) | ||
54 | |||
55 | if (areValidationErrors(req, res)) return | 50 | if (areValidationErrors(req, res)) return |
56 | if (!await doesVideoExist(req.params.videoId, res)) return | 51 | if (!await doesVideoExist(req.params.videoId, res)) return |
57 | if (!await doesVideoCaptionExist(res.locals.videoAll, req.params.captionLanguage, res)) return | 52 | if (!await doesVideoCaptionExist(res.locals.videoAll, req.params.captionLanguage, res)) return |
@@ -68,8 +63,6 @@ const listVideoCaptionsValidator = [ | |||
68 | isValidVideoIdParam('videoId'), | 63 | isValidVideoIdParam('videoId'), |
69 | 64 | ||
70 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { | 65 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { |
71 | logger.debug('Checking listVideoCaptions parameters', { parameters: req.params }) | ||
72 | |||
73 | if (areValidationErrors(req, res)) return | 66 | if (areValidationErrors(req, res)) return |
74 | if (!await doesVideoExist(req.params.videoId, res, 'only-video')) return | 67 | if (!await doesVideoExist(req.params.videoId, res, 'only-video')) return |
75 | 68 | ||