aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/users.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators/users.js')
-rw-r--r--server/middlewares/validators/users.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/middlewares/validators/users.js b/server/middlewares/validators/users.js
index ce83fc074..1e7a64793 100644
--- a/server/middlewares/validators/users.js
+++ b/server/middlewares/validators/users.js
@@ -56,7 +56,8 @@ function usersRemove (req, res, next) {
56function usersUpdate (req, res, next) { 56function usersUpdate (req, res, next) {
57 req.checkParams('id', 'Should have a valid id').notEmpty().isInt() 57 req.checkParams('id', 'Should have a valid id').notEmpty().isInt()
58 // Add old password verification 58 // Add old password verification
59 req.checkBody('password', 'Should have a valid password').isUserPasswordValid() 59 req.checkBody('password', 'Should have a valid password').optional().isUserPasswordValid()
60 req.checkBody('displayNSFW', 'Should have a valid display Not Safe For Work attribute').optional().isUserDisplayNSFWValid()
60 61
61 logger.debug('Checking usersUpdate parameters', { parameters: req.body }) 62 logger.debug('Checking usersUpdate parameters', { parameters: req.body })
62 63