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.ts5
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'
21import { doesVideoExist } from '../../helpers/custom-validators/videos'
22import { logger } from '../../helpers/logger' 22import { logger } from '../../helpers/logger'
23import { isSignupAllowed, isSignupAllowedForCurrentIP } from '../../helpers/signup' 23import { isSignupAllowed, isSignupAllowedForCurrentIP } from '../../helpers/signup'
24import { Redis } from '../../lib/redis' 24import { Redis } from '../../lib/redis'
@@ -30,6 +30,7 @@ import { isVideoChannelNameValid } from '../../helpers/custom-validators/video-c
30import { UserRegister } from '../../../shared/models/users/user-register.model' 30import { UserRegister } from '../../../shared/models/users/user-register.model'
31import { isThemeNameValid } from '../../helpers/custom-validators/plugins' 31import { isThemeNameValid } from '../../helpers/custom-validators/plugins'
32import { isThemeRegistered } from '../../lib/plugins/theme-utils' 32import { isThemeRegistered } from '../../lib/plugins/theme-utils'
33import { doesVideoExist } from '../../helpers/middlewares'
33 34
34const usersAddValidator = [ 35const 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)'),