diff options
Diffstat (limited to 'server/middlewares/validators/search.ts')
-rw-r--r-- | server/middlewares/validators/search.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/server/middlewares/validators/search.ts b/server/middlewares/validators/search.ts index e2e1c6aae..7bbf81048 100644 --- a/server/middlewares/validators/search.ts +++ b/server/middlewares/validators/search.ts | |||
@@ -49,11 +49,12 @@ const videoChannelsListSearchValidator = [ | |||
49 | } | 49 | } |
50 | ] | 50 | ] |
51 | 51 | ||
52 | const videoChannelsOwnSearchValidator = [ | 52 | const videoPlaylistsListSearchValidator = [ |
53 | query('search').optional().not().isEmpty().withMessage('Should have a valid search'), | 53 | query('search').not().isEmpty().withMessage('Should have a valid search'), |
54 | query('searchTarget').optional().custom(isSearchTargetValid).withMessage('Should have a valid search target'), | ||
54 | 55 | ||
55 | (req: express.Request, res: express.Response, next: express.NextFunction) => { | 56 | (req: express.Request, res: express.Response, next: express.NextFunction) => { |
56 | logger.debug('Checking video channels search query', { parameters: req.query }) | 57 | logger.debug('Checking video playlists search query', { parameters: req.query }) |
57 | 58 | ||
58 | if (areValidationErrors(req, res)) return | 59 | if (areValidationErrors(req, res)) return |
59 | 60 | ||
@@ -66,5 +67,5 @@ const videoChannelsOwnSearchValidator = [ | |||
66 | export { | 67 | export { |
67 | videosSearchValidator, | 68 | videosSearchValidator, |
68 | videoChannelsListSearchValidator, | 69 | videoChannelsListSearchValidator, |
69 | videoChannelsOwnSearchValidator | 70 | videoPlaylistsListSearchValidator |
70 | } | 71 | } |