aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-04-03 21:24:36 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-04-03 21:24:36 +0200
commit1d49e1e27d63db1dfc9a7fd28c9902f488831a89 (patch)
treece3353ad691876c55ce8fcfdd70bfa2b9112b39a /server/middlewares/validators
parent31b59b477459d4f26ed8ef089a0e5553fb6a332b (diff)
downloadPeerTube-1d49e1e27d63db1dfc9a7fd28c9902f488831a89.tar.gz
PeerTube-1d49e1e27d63db1dfc9a7fd28c9902f488831a89.tar.zst
PeerTube-1d49e1e27d63db1dfc9a7fd28c9902f488831a89.zip
Server: Add NSFW in user profile
Diffstat (limited to 'server/middlewares/validators')
-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