diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2021-05-10 16:09:59 +0200 |
---|---|---|
committer | Rigel Kent <sendmemail@rigelk.eu> | 2021-05-11 01:50:42 +0200 |
commit | b8375da9313e0755d664306163139220a41d9ced (patch) | |
tree | 6703eb11cb4014b7f233252890a71b43830fb7ec /server/middlewares | |
parent | bb8f371d376c63a8774c17c2ede69fc065cfd30c (diff) | |
download | PeerTube-b8375da9313e0755d664306163139220a41d9ced.tar.gz PeerTube-b8375da9313e0755d664306163139220a41d9ced.tar.zst PeerTube-b8375da9313e0755d664306163139220a41d9ced.zip |
provide more schema examples in openapi spec
Diffstat (limited to 'server/middlewares')
-rw-r--r-- | server/middlewares/validators/users.ts | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/server/middlewares/validators/users.ts b/server/middlewares/validators/users.ts index 9cff51d45..37119e279 100644 --- a/server/middlewares/validators/users.ts +++ b/server/middlewares/validators/users.ts | |||
@@ -196,6 +196,7 @@ const deleteMeValidator = [ | |||
196 | 196 | ||
197 | const usersUpdateValidator = [ | 197 | const usersUpdateValidator = [ |
198 | param('id').isInt().not().isEmpty().withMessage('Should have a valid id'), | 198 | param('id').isInt().not().isEmpty().withMessage('Should have a valid id'), |
199 | |||
199 | body('password').optional().custom(isUserPasswordValid).withMessage('Should have a valid password'), | 200 | body('password').optional().custom(isUserPasswordValid).withMessage('Should have a valid password'), |
200 | body('email').optional().isEmail().withMessage('Should have a valid email attribute'), | 201 | body('email').optional().isEmail().withMessage('Should have a valid email attribute'), |
201 | body('emailVerified').optional().isBoolean().withMessage('Should have a valid email verified attribute'), | 202 | body('emailVerified').optional().isBoolean().withMessage('Should have a valid email verified attribute'), |