diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-07-03 10:28:19 +0200 |
---|---|---|
committer | Rigel Kent <sendmemail@rigelk.eu> | 2020-07-03 10:29:03 +0200 |
commit | ea7337cfdee00894792762660fa3c3412aeccccb (patch) | |
tree | 24f2b062b2d21753070e574a6e0fb4f3a531c439 /server/middlewares/validators | |
parent | 8491293b02ed2ec53eb0fa128161ea0b08d3def9 (diff) | |
download | PeerTube-ea7337cfdee00894792762660fa3c3412aeccccb.tar.gz PeerTube-ea7337cfdee00894792762660fa3c3412aeccccb.tar.zst PeerTube-ea7337cfdee00894792762660fa3c3412aeccccb.zip |
add check-params test for user list
fixes #2918
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r-- | server/middlewares/validators/users.ts | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/server/middlewares/validators/users.ts b/server/middlewares/validators/users.ts index 6860a3bed..423da9bc0 100644 --- a/server/middlewares/validators/users.ts +++ b/server/middlewares/validators/users.ts | |||
@@ -41,10 +41,9 @@ import { Hooks } from '@server/lib/plugins/hooks' | |||
41 | const usersListValidator = [ | 41 | const usersListValidator = [ |
42 | query('blocked') | 42 | query('blocked') |
43 | .optional() | 43 | .optional() |
44 | .customSanitizer(toBooleanOrNull) | ||
45 | .isBoolean().withMessage('Should be a valid boolean banned state'), | 44 | .isBoolean().withMessage('Should be a valid boolean banned state'), |
46 | 45 | ||
47 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { | 46 | (req: express.Request, res: express.Response, next: express.NextFunction) => { |
48 | logger.debug('Checking usersList parameters', { parameters: req.query }) | 47 | logger.debug('Checking usersList parameters', { parameters: req.query }) |
49 | 48 | ||
50 | if (areValidationErrors(req, res)) return | 49 | if (areValidationErrors(req, res)) return |