diff options
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r-- | server/middlewares/validators/videos/videos.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/server/middlewares/validators/videos/videos.ts b/server/middlewares/validators/videos/videos.ts index 8bc37b0ab..84e309bec 100644 --- a/server/middlewares/validators/videos/videos.ts +++ b/server/middlewares/validators/videos/videos.ts | |||
@@ -6,6 +6,7 @@ import { MVideoFullLight } from '@server/types/models' | |||
6 | import { ServerErrorCode, UserRight, VideoChangeOwnershipStatus, VideoPrivacy } from '../../../../shared' | 6 | import { ServerErrorCode, UserRight, VideoChangeOwnershipStatus, VideoPrivacy } from '../../../../shared' |
7 | import { VideoChangeOwnershipAccept } from '../../../../shared/models/videos/video-change-ownership-accept.model' | 7 | import { VideoChangeOwnershipAccept } from '../../../../shared/models/videos/video-change-ownership-accept.model' |
8 | import { | 8 | import { |
9 | exists, | ||
9 | isBooleanValid, | 10 | isBooleanValid, |
10 | isDateValid, | 11 | isDateValid, |
11 | isFileFieldValid, | 12 | isFileFieldValid, |
@@ -444,6 +445,9 @@ const commonVideosFiltersValidator = [ | |||
444 | .optional() | 445 | .optional() |
445 | .customSanitizer(toBooleanOrNull) | 446 | .customSanitizer(toBooleanOrNull) |
446 | .custom(isBooleanValid).withMessage('Should have a valid skip count boolean'), | 447 | .custom(isBooleanValid).withMessage('Should have a valid skip count boolean'), |
448 | query('search') | ||
449 | .optional() | ||
450 | .custom(exists).withMessage('Should have a valid search'), | ||
447 | 451 | ||
448 | (req: express.Request, res: express.Response, next: express.NextFunction) => { | 452 | (req: express.Request, res: express.Response, next: express.NextFunction) => { |
449 | logger.debug('Checking commons video filters query', { parameters: req.query }) | 453 | logger.debug('Checking commons video filters query', { parameters: req.query }) |