aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares')
-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 920176d07..a6fdbe268 100644
--- a/server/middlewares/validators/users.ts
+++ b/server/middlewares/validators/users.ts
@@ -5,6 +5,7 @@ import { isSignupAllowed, logger } from '../../helpers'
5import { isIdOrUUIDValid } from '../../helpers/custom-validators/misc' 5import { isIdOrUUIDValid } from '../../helpers/custom-validators/misc'
6import { 6import {
7 isUserDisplayNSFWValid, 7 isUserDisplayNSFWValid,
8 isUserAutoPlayVideoValid,
8 isUserPasswordValid, 9 isUserPasswordValid,
9 isUserRoleValid, 10 isUserRoleValid,
10 isUserUsernameValid, 11 isUserUsernameValid,
@@ -86,6 +87,7 @@ const usersUpdateMeValidator = [
86 body('password').optional().custom(isUserPasswordValid).withMessage('Should have a valid password'), 87 body('password').optional().custom(isUserPasswordValid).withMessage('Should have a valid password'),
87 body('email').optional().isEmail().withMessage('Should have a valid email attribute'), 88 body('email').optional().isEmail().withMessage('Should have a valid email attribute'),
88 body('displayNSFW').optional().custom(isUserDisplayNSFWValid).withMessage('Should have a valid display Not Safe For Work attribute'), 89 body('displayNSFW').optional().custom(isUserDisplayNSFWValid).withMessage('Should have a valid display Not Safe For Work attribute'),
90 body('autoPlayVideo').optional().custom(isUserAutoPlayVideoValid).withMessage('Should have a valid automatically plays video attribute'),
89 91
90 (req: express.Request, res: express.Response, next: express.NextFunction) => { 92 (req: express.Request, res: express.Response, next: express.NextFunction) => {
91 // TODO: Add old password verification 93 // TODO: Add old password verification