diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-04-03 21:24:36 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-04-03 21:24:36 +0200 |
commit | 1d49e1e27d63db1dfc9a7fd28c9902f488831a89 (patch) | |
tree | ce3353ad691876c55ce8fcfdd70bfa2b9112b39a /server/middlewares/validators/users.js | |
parent | 31b59b477459d4f26ed8ef089a0e5553fb6a332b (diff) | |
download | PeerTube-1d49e1e27d63db1dfc9a7fd28c9902f488831a89.tar.gz PeerTube-1d49e1e27d63db1dfc9a7fd28c9902f488831a89.tar.zst PeerTube-1d49e1e27d63db1dfc9a7fd28c9902f488831a89.zip |
Server: Add NSFW in user profile
Diffstat (limited to 'server/middlewares/validators/users.js')
-rw-r--r-- | server/middlewares/validators/users.js | 3 |
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) { | |||
56 | function usersUpdate (req, res, next) { | 56 | function 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 | ||