From e0a929179a9dc76e035ca7fda2b61d5ff46afbc5 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Sun, 19 Apr 2020 14:11:40 +0200 Subject: Add filter inputs for blacklisted videos and muted accounts/servers --- server/middlewares/validators/videos/video-blacklist.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'server/middlewares') diff --git a/server/middlewares/validators/videos/video-blacklist.ts b/server/middlewares/validators/videos/video-blacklist.ts index 5440e57e7..4bd6a8333 100644 --- a/server/middlewares/validators/videos/video-blacklist.ts +++ b/server/middlewares/validators/videos/video-blacklist.ts @@ -69,6 +69,10 @@ const videosBlacklistFiltersValidator = [ query('type') .optional() .custom(isVideoBlacklistTypeValid).withMessage('Should have a valid video blacklist type attribute'), + query('search') + .optional() + .not() + .isEmpty().withMessage('Should have a valid search'), (req: express.Request, res: express.Response, next: express.NextFunction) => { logger.debug('Checking videos blacklist filters query', { parameters: req.query }) -- cgit v1.2.3