aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/users.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-04-19 11:01:34 +0200
committerChocobozzz <me@florianbigard.com>2018-04-19 11:01:34 +0200
commit0883b3245bf0deb9106c4041e9afbd3521b79280 (patch)
treefcb73005e0b31a3b763ee5d22d5fc39c2da89907 /server/middlewares/validators/users.ts
parent04ed10b21e8e1339514faae0bb690e4d97c23b0a (diff)
downloadPeerTube-0883b3245bf0deb9106c4041e9afbd3521b79280.tar.gz
PeerTube-0883b3245bf0deb9106c4041e9afbd3521b79280.tar.zst
PeerTube-0883b3245bf0deb9106c4041e9afbd3521b79280.zip
Add ability to choose what policy we have for NSFW videos
There is a global instance setting and a per user setting
Diffstat (limited to 'server/middlewares/validators/users.ts')
-rw-r--r--server/middlewares/validators/users.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/middlewares/validators/users.ts b/server/middlewares/validators/users.ts
index 6ea3d0b6c..5dd8caa3f 100644
--- a/server/middlewares/validators/users.ts
+++ b/server/middlewares/validators/users.ts
@@ -8,7 +8,7 @@ import {
8 isAvatarFile, 8 isAvatarFile,
9 isUserAutoPlayVideoValid, 9 isUserAutoPlayVideoValid,
10 isUserDescriptionValid, 10 isUserDescriptionValid,
11 isUserDisplayNSFWValid, 11 isUserNSFWPolicyValid,
12 isUserPasswordValid, 12 isUserPasswordValid,
13 isUserRoleValid, 13 isUserRoleValid,
14 isUserUsernameValid, 14 isUserUsernameValid,
@@ -101,7 +101,7 @@ const usersUpdateMeValidator = [
101 body('description').optional().custom(isUserDescriptionValid).withMessage('Should have a valid description'), 101 body('description').optional().custom(isUserDescriptionValid).withMessage('Should have a valid description'),
102 body('password').optional().custom(isUserPasswordValid).withMessage('Should have a valid password'), 102 body('password').optional().custom(isUserPasswordValid).withMessage('Should have a valid password'),
103 body('email').optional().isEmail().withMessage('Should have a valid email attribute'), 103 body('email').optional().isEmail().withMessage('Should have a valid email attribute'),
104 body('displayNSFW').optional().custom(isUserDisplayNSFWValid).withMessage('Should have a valid display Not Safe For Work attribute'), 104 body('nsfwPolicy').optional().custom(isUserNSFWPolicyValid).withMessage('Should have a valid display Not Safe For Work policy'),
105 body('autoPlayVideo').optional().custom(isUserAutoPlayVideoValid).withMessage('Should have a valid automatically plays video attribute'), 105 body('autoPlayVideo').optional().custom(isUserAutoPlayVideoValid).withMessage('Should have a valid automatically plays video attribute'),
106 106
107 (req: express.Request, res: express.Response, next: express.NextFunction) => { 107 (req: express.Request, res: express.Response, next: express.NextFunction) => {