diff options
Diffstat (limited to 'server/middlewares/validators/users.ts')
-rw-r--r-- | server/middlewares/validators/users.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/server/middlewares/validators/users.ts b/server/middlewares/validators/users.ts index 7a6b2ce57..bc6007c6d 100644 --- a/server/middlewares/validators/users.ts +++ b/server/middlewares/validators/users.ts | |||
@@ -15,6 +15,7 @@ import { | |||
15 | isUserDisplayNameValid, | 15 | isUserDisplayNameValid, |
16 | isUserNoModal, | 16 | isUserNoModal, |
17 | isUserNSFWPolicyValid, | 17 | isUserNSFWPolicyValid, |
18 | isUserP2PEnabledValid, | ||
18 | isUserPasswordValid, | 19 | isUserPasswordValid, |
19 | isUserPasswordValidOrEmpty, | 20 | isUserPasswordValidOrEmpty, |
20 | isUserRoleValid, | 21 | isUserRoleValid, |
@@ -239,6 +240,9 @@ const usersUpdateMeValidator = [ | |||
239 | body('autoPlayVideo') | 240 | body('autoPlayVideo') |
240 | .optional() | 241 | .optional() |
241 | .custom(isUserAutoPlayVideoValid).withMessage('Should have a valid automatically plays video attribute'), | 242 | .custom(isUserAutoPlayVideoValid).withMessage('Should have a valid automatically plays video attribute'), |
243 | body('p2pEnabled') | ||
244 | .optional() | ||
245 | .custom(isUserP2PEnabledValid).withMessage('Should have a valid p2p enabled boolean'), | ||
242 | body('videoLanguages') | 246 | body('videoLanguages') |
243 | .optional() | 247 | .optional() |
244 | .custom(isUserVideoLanguages).withMessage('Should have a valid video languages attribute'), | 248 | .custom(isUserVideoLanguages).withMessage('Should have a valid video languages attribute'), |