aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/users.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2021-05-10 16:09:59 +0200
committerRigel Kent <sendmemail@rigelk.eu>2021-05-11 01:50:42 +0200
commitb8375da9313e0755d664306163139220a41d9ced (patch)
tree6703eb11cb4014b7f233252890a71b43830fb7ec /server/middlewares/validators/users.ts
parentbb8f371d376c63a8774c17c2ede69fc065cfd30c (diff)
downloadPeerTube-b8375da9313e0755d664306163139220a41d9ced.tar.gz
PeerTube-b8375da9313e0755d664306163139220a41d9ced.tar.zst
PeerTube-b8375da9313e0755d664306163139220a41d9ced.zip
provide more schema examples in openapi spec
Diffstat (limited to 'server/middlewares/validators/users.ts')
-rw-r--r--server/middlewares/validators/users.ts1
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
197const usersUpdateValidator = [ 197const 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'),