diff options
Diffstat (limited to 'server/middlewares')
-rw-r--r-- | server/middlewares/validators/search.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/middlewares/validators/search.ts b/server/middlewares/validators/search.ts index a97f5b581..e516c4c41 100644 --- a/server/middlewares/validators/search.ts +++ b/server/middlewares/validators/search.ts | |||
@@ -6,7 +6,7 @@ import { isNumberArray, isStringArray, isNSFWQueryValid } from '../../helpers/cu | |||
6 | import { isBooleanValid, isDateValid, toArray } from '../../helpers/custom-validators/misc' | 6 | import { isBooleanValid, isDateValid, toArray } from '../../helpers/custom-validators/misc' |
7 | 7 | ||
8 | const searchValidator = [ | 8 | const searchValidator = [ |
9 | query('search').not().isEmpty().withMessage('Should have a valid search'), | 9 | query('search').optional().not().isEmpty().withMessage('Should have a valid search'), |
10 | 10 | ||
11 | query('startDate').optional().custom(isDateValid).withMessage('Should have a valid start date'), | 11 | query('startDate').optional().custom(isDateValid).withMessage('Should have a valid start date'), |
12 | query('endDate').optional().custom(isDateValid).withMessage('Should have a valid end date'), | 12 | query('endDate').optional().custom(isDateValid).withMessage('Should have a valid end date'), |