aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r--server/middlewares/validators/search.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/server/middlewares/validators/search.ts b/server/middlewares/validators/search.ts
index cde300968..27d0e541d 100644
--- a/server/middlewares/validators/search.ts
+++ b/server/middlewares/validators/search.ts
@@ -2,7 +2,7 @@ import * as express from 'express'
2import { query } from 'express-validator' 2import { query } from 'express-validator'
3import { isSearchTargetValid } from '@server/helpers/custom-validators/search' 3import { isSearchTargetValid } from '@server/helpers/custom-validators/search'
4import { isHostValid } from '@server/helpers/custom-validators/servers' 4import { isHostValid } from '@server/helpers/custom-validators/servers'
5import { areUUIDsValid, isDateValid, toCompleteUUIDs } from '../../helpers/custom-validators/misc' 5import { areUUIDsValid, isDateValid, isNotEmptyStringArray, toCompleteUUIDs } from '../../helpers/custom-validators/misc'
6import { logger } from '../../helpers/logger' 6import { logger } from '../../helpers/logger'
7import { areValidationErrors } from './shared' 7import { areValidationErrors } from './shared'
8 8
@@ -64,9 +64,10 @@ const videoChannelsListSearchValidator = [
64 .optional() 64 .optional()
65 .custom(isSearchTargetValid).withMessage('Should have a valid search target'), 65 .custom(isSearchTargetValid).withMessage('Should have a valid search target'),
66 66
67 query('names') 67 query('handles')
68 .optional() 68 .optional()
69 .toArray(), 69 .toArray()
70 .custom(isNotEmptyStringArray).withMessage('Should have valid handles'),
70 71
71 (req: express.Request, res: express.Response, next: express.NextFunction) => { 72 (req: express.Request, res: express.Response, next: express.NextFunction) => {
72 logger.debug('Checking video channels search query', { parameters: req.query }) 73 logger.debug('Checking video channels search query', { parameters: req.query })