aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/users.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators/users.ts')
-rw-r--r--server/middlewares/validators/users.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/middlewares/validators/users.ts b/server/middlewares/validators/users.ts
index cba15c8d3..49bc0bb56 100644
--- a/server/middlewares/validators/users.ts
+++ b/server/middlewares/validators/users.ts
@@ -7,6 +7,7 @@ import { isIdOrUUIDValid } from '../../helpers/custom-validators/misc'
7import { 7import {
8 isAvatarFile, 8 isAvatarFile,
9 isUserAutoPlayVideoValid, 9 isUserAutoPlayVideoValid,
10 isUserDescriptionValid,
10 isUserDisplayNSFWValid, 11 isUserDisplayNSFWValid,
11 isUserPasswordValid, 12 isUserPasswordValid,
12 isUserRoleValid, 13 isUserRoleValid,
@@ -97,6 +98,7 @@ const usersUpdateValidator = [
97] 98]
98 99
99const usersUpdateMeValidator = [ 100const usersUpdateMeValidator = [
101 body('description').optional().custom(isUserDescriptionValid).withMessage('Should have a valid description'),
100 body('password').optional().custom(isUserPasswordValid).withMessage('Should have a valid password'), 102 body('password').optional().custom(isUserPasswordValid).withMessage('Should have a valid password'),
101 body('email').optional().isEmail().withMessage('Should have a valid email attribute'), 103 body('email').optional().isEmail().withMessage('Should have a valid email attribute'),
102 body('displayNSFW').optional().custom(isUserDisplayNSFWValid).withMessage('Should have a valid display Not Safe For Work attribute'), 104 body('displayNSFW').optional().custom(isUserDisplayNSFWValid).withMessage('Should have a valid display Not Safe For Work attribute'),