diff options
Diffstat (limited to 'server/middlewares/validators/users.ts')
-rw-r--r-- | server/middlewares/validators/users.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/middlewares/validators/users.ts b/server/middlewares/validators/users.ts index 9cff51d45..548d5df4d 100644 --- a/server/middlewares/validators/users.ts +++ b/server/middlewares/validators/users.ts | |||
@@ -34,8 +34,8 @@ import { doesVideoExist } from '../../helpers/middlewares' | |||
34 | import { isSignupAllowed, isSignupAllowedForCurrentIP } from '../../helpers/signup' | 34 | import { isSignupAllowed, isSignupAllowedForCurrentIP } from '../../helpers/signup' |
35 | import { isThemeRegistered } from '../../lib/plugins/theme-utils' | 35 | import { isThemeRegistered } from '../../lib/plugins/theme-utils' |
36 | import { Redis } from '../../lib/redis' | 36 | import { Redis } from '../../lib/redis' |
37 | import { UserModel } from '../../models/account/user' | 37 | import { UserModel } from '../../models/user/user' |
38 | import { ActorModel } from '../../models/activitypub/actor' | 38 | import { ActorModel } from '../../models/actor/actor' |
39 | import { areValidationErrors } from './utils' | 39 | import { areValidationErrors } from './utils' |
40 | 40 | ||
41 | const usersListValidator = [ | 41 | const usersListValidator = [ |
@@ -196,6 +196,7 @@ const deleteMeValidator = [ | |||
196 | 196 | ||
197 | const usersUpdateValidator = [ | 197 | const usersUpdateValidator = [ |
198 | param('id').isInt().not().isEmpty().withMessage('Should have a valid id'), | 198 | param('id').isInt().not().isEmpty().withMessage('Should have a valid id'), |
199 | |||
199 | body('password').optional().custom(isUserPasswordValid).withMessage('Should have a valid password'), | 200 | body('password').optional().custom(isUserPasswordValid).withMessage('Should have a valid password'), |
200 | body('email').optional().isEmail().withMessage('Should have a valid email attribute'), | 201 | body('email').optional().isEmail().withMessage('Should have a valid email attribute'), |
201 | body('emailVerified').optional().isBoolean().withMessage('Should have a valid email verified attribute'), | 202 | body('emailVerified').optional().isBoolean().withMessage('Should have a valid email verified attribute'), |