aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-07-24 11:09:00 +0200
committerChocobozzz <me@florianbigard.com>2018-07-24 14:04:05 +0200
commitd411245096b7c9ec06e6fa2ceff7aa7b0fc0c3b7 (patch)
tree991a4c3e753b2371c8e314fd79ebc134b45659d1 /server/middlewares/validators
parentcddf45035389cc7d9003ea2b64fff3c28cd368d9 (diff)
downloadPeerTube-d411245096b7c9ec06e6fa2ceff7aa7b0fc0c3b7.tar.gz
PeerTube-d411245096b7c9ec06e6fa2ceff7aa7b0fc0c3b7.tar.zst
PeerTube-d411245096b7c9ec06e6fa2ceff7aa7b0fc0c3b7.zip
Add ability to only filter in the search endpoint
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r--server/middlewares/validators/search.ts2
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
6import { isBooleanValid, isDateValid, toArray } from '../../helpers/custom-validators/misc' 6import { isBooleanValid, isDateValid, toArray } from '../../helpers/custom-validators/misc'
7 7
8const searchValidator = [ 8const 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'),