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 a507afc5b..7002de20d 100644 --- a/server/middlewares/validators/users.ts +++ b/server/middlewares/validators/users.ts | |||
@@ -13,12 +13,12 @@ import { | |||
13 | isUserNSFWPolicyValid, | 13 | isUserNSFWPolicyValid, |
14 | isUserPasswordValid, | 14 | isUserPasswordValid, |
15 | isUserRoleValid, | 15 | isUserRoleValid, |
16 | isUserUsernameValid, isUserVideoLanguages, | 16 | isUserUsernameValid, |
17 | isUserVideoLanguages, | ||
17 | isUserVideoQuotaDailyValid, | 18 | isUserVideoQuotaDailyValid, |
18 | isUserVideoQuotaValid, | 19 | isUserVideoQuotaValid, |
19 | isUserVideosHistoryEnabledValid | 20 | isUserVideosHistoryEnabledValid |
20 | } from '../../helpers/custom-validators/users' | 21 | } from '../../helpers/custom-validators/users' |
21 | import { doesVideoExist } from '../../helpers/custom-validators/videos' | ||
22 | import { logger } from '../../helpers/logger' | 22 | import { logger } from '../../helpers/logger' |
23 | import { isSignupAllowed, isSignupAllowedForCurrentIP } from '../../helpers/signup' | 23 | import { isSignupAllowed, isSignupAllowedForCurrentIP } from '../../helpers/signup' |
24 | import { Redis } from '../../lib/redis' | 24 | import { Redis } from '../../lib/redis' |
@@ -30,6 +30,7 @@ import { isVideoChannelNameValid } from '../../helpers/custom-validators/video-c | |||
30 | import { UserRegister } from '../../../shared/models/users/user-register.model' | 30 | import { UserRegister } from '../../../shared/models/users/user-register.model' |
31 | import { isThemeNameValid } from '../../helpers/custom-validators/plugins' | 31 | import { isThemeNameValid } from '../../helpers/custom-validators/plugins' |
32 | import { isThemeRegistered } from '../../lib/plugins/theme-utils' | 32 | import { isThemeRegistered } from '../../lib/plugins/theme-utils' |
33 | import { doesVideoExist } from '../../helpers/middlewares' | ||
33 | 34 | ||
34 | const usersAddValidator = [ | 35 | const usersAddValidator = [ |
35 | body('username').custom(isUserUsernameValid).withMessage('Should have a valid username (lowercase alphanumeric characters)'), | 36 | body('username').custom(isUserUsernameValid).withMessage('Should have a valid username (lowercase alphanumeric characters)'), |