X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmiddlewares%2Fvalidators%2Fusers.ts;h=548d5df4df334aa83825e3bd31cf8bab05f31ac7;hb=8ee37c5f38b0f9b7e97239197d5590109c163250;hp=9cff51d45eec67c58a779f0cd9dbf863cd72cc0a;hpb=5e8dd6e08ac1595aeb72c6b5b2c7d2c6aced8b47;p=github%2FChocobozzz%2FPeerTube.git 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' import { isSignupAllowed, isSignupAllowedForCurrentIP } from '../../helpers/signup' import { isThemeRegistered } from '../../lib/plugins/theme-utils' import { Redis } from '../../lib/redis' -import { UserModel } from '../../models/account/user' -import { ActorModel } from '../../models/activitypub/actor' +import { UserModel } from '../../models/user/user' +import { ActorModel } from '../../models/actor/actor' import { areValidationErrors } from './utils' const usersListValidator = [ @@ -196,6 +196,7 @@ const deleteMeValidator = [ const usersUpdateValidator = [ param('id').isInt().not().isEmpty().withMessage('Should have a valid id'), + body('password').optional().custom(isUserPasswordValid).withMessage('Should have a valid password'), body('email').optional().isEmail().withMessage('Should have a valid email attribute'), body('emailVerified').optional().isBoolean().withMessage('Should have a valid email verified attribute'),