From fe98765624cdd6695739bda719fcb726b71c2b2a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 8 Jan 2020 14:15:16 +0100 Subject: Add ability to skip count query --- server/middlewares/validators/videos/videos.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'server/middlewares/validators/videos') diff --git a/server/middlewares/validators/videos/videos.ts b/server/middlewares/validators/videos/videos.ts index 5e0182cc3..6733d9dec 100644 --- a/server/middlewares/validators/videos/videos.ts +++ b/server/middlewares/validators/videos/videos.ts @@ -381,6 +381,10 @@ const commonVideosFiltersValidator = [ query('filter') .optional() .custom(isVideoFilterValid).withMessage('Should have a valid filter attribute'), + query('skipCount') + .optional() + .customSanitizer(toBooleanOrNull) + .custom(isBooleanValid).withMessage('Should have a valid skip count boolean'), (req: express.Request, res: express.Response, next: express.NextFunction) => { logger.debug('Checking commons video filters query', { parameters: req.query }) -- cgit v1.2.3