From 0883b3245bf0deb9106c4041e9afbd3521b79280 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 19 Apr 2018 11:01:34 +0200 Subject: Add ability to choose what policy we have for NSFW videos There is a global instance setting and a per user setting --- server/middlewares/validators/users.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/middlewares/validators/users.ts') 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 { isAvatarFile, isUserAutoPlayVideoValid, isUserDescriptionValid, - isUserDisplayNSFWValid, + isUserNSFWPolicyValid, isUserPasswordValid, isUserRoleValid, isUserUsernameValid, @@ -101,7 +101,7 @@ const usersUpdateMeValidator = [ body('description').optional().custom(isUserDescriptionValid).withMessage('Should have a valid description'), body('password').optional().custom(isUserPasswordValid).withMessage('Should have a valid password'), body('email').optional().isEmail().withMessage('Should have a valid email attribute'), - body('displayNSFW').optional().custom(isUserDisplayNSFWValid).withMessage('Should have a valid display Not Safe For Work attribute'), + body('nsfwPolicy').optional().custom(isUserNSFWPolicyValid).withMessage('Should have a valid display Not Safe For Work policy'), body('autoPlayVideo').optional().custom(isUserAutoPlayVideoValid).withMessage('Should have a valid automatically plays video attribute'), (req: express.Request, res: express.Response, next: express.NextFunction) => { -- cgit v1.2.3