From b8375da9313e0755d664306163139220a41d9ced Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Mon, 10 May 2021 16:09:59 +0200 Subject: provide more schema examples in openapi spec --- server/middlewares/validators/users.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'server') 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 = [ const usersUpdateValidator = [ param('id').isInt().not().isEmpty().withMessage('Should have a valid id'), + body('password').optional().custom(isUserPasswordValid).withMessage('Should have a valid password'), body('email').optional().isEmail().withMessage('Should have a valid email attribute'), body('emailVerified').optional().isBoolean().withMessage('Should have a valid email verified attribute'), -- cgit v1.2.3