From 06215f15e0a9fea2ef95b8b49cb2b5868fb64017 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 14 Aug 2018 15:28:30 +0200 Subject: Cleanup utils helper --- server/middlewares/validators/avatar.ts | 2 +- server/middlewares/validators/users.ts | 2 +- server/middlewares/validators/video-captions.ts | 2 +- server/middlewares/validators/video-imports.ts | 2 +- server/middlewares/validators/videos.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'server/middlewares/validators') diff --git a/server/middlewares/validators/avatar.ts b/server/middlewares/validators/avatar.ts index 5860735c6..ddc14f531 100644 --- a/server/middlewares/validators/avatar.ts +++ b/server/middlewares/validators/avatar.ts @@ -4,7 +4,7 @@ import { isAvatarFile } from '../../helpers/custom-validators/users' import { areValidationErrors } from './utils' import { CONSTRAINTS_FIELDS } from '../../initializers' import { logger } from '../../helpers/logger' -import { cleanUpReqFiles } from '../../helpers/utils' +import { cleanUpReqFiles } from '../../helpers/express-utils' const updateAvatarValidator = [ body('avatarfile').custom((value, { req }) => isAvatarFile(req.files)).withMessage( diff --git a/server/middlewares/validators/users.ts b/server/middlewares/validators/users.ts index 771c414a0..f47fa8b48 100644 --- a/server/middlewares/validators/users.ts +++ b/server/middlewares/validators/users.ts @@ -16,7 +16,7 @@ import { } from '../../helpers/custom-validators/users' import { isVideoExist } from '../../helpers/custom-validators/videos' import { logger } from '../../helpers/logger' -import { isSignupAllowed, isSignupAllowedForCurrentIP } from '../../helpers/utils' +import { isSignupAllowed, isSignupAllowedForCurrentIP } from '../../helpers/signup' import { Redis } from '../../lib/redis' import { UserModel } from '../../models/account/user' import { areValidationErrors } from './utils' diff --git a/server/middlewares/validators/video-captions.ts b/server/middlewares/validators/video-captions.ts index 18d537bc4..4f393ea84 100644 --- a/server/middlewares/validators/video-captions.ts +++ b/server/middlewares/validators/video-captions.ts @@ -7,7 +7,7 @@ import { CONSTRAINTS_FIELDS } from '../../initializers' import { UserRight } from '../../../shared' import { logger } from '../../helpers/logger' import { isVideoCaptionExist, isVideoCaptionFile, isVideoCaptionLanguageValid } from '../../helpers/custom-validators/video-captions' -import { cleanUpReqFiles } from '../../helpers/utils' +import { cleanUpReqFiles } from '../../helpers/express-utils' const addVideoCaptionValidator = [ param('videoId').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid video id'), diff --git a/server/middlewares/validators/video-imports.ts b/server/middlewares/validators/video-imports.ts index 9ac739101..b2063b8da 100644 --- a/server/middlewares/validators/video-imports.ts +++ b/server/middlewares/validators/video-imports.ts @@ -5,7 +5,7 @@ import { logger } from '../../helpers/logger' import { areValidationErrors } from './utils' import { getCommonVideoAttributes } from './videos' import { isVideoImportTargetUrlValid, isVideoImportTorrentFile } from '../../helpers/custom-validators/video-imports' -import { cleanUpReqFiles } from '../../helpers/utils' +import { cleanUpReqFiles } from '../../helpers/express-utils' import { isVideoChannelOfAccountExist, isVideoMagnetUriValid, isVideoNameValid } from '../../helpers/custom-validators/videos' import { CONFIG } from '../../initializers/constants' import { CONSTRAINTS_FIELDS } from '../../initializers' diff --git a/server/middlewares/validators/videos.ts b/server/middlewares/validators/videos.ts index 77d601a4d..53c32abb8 100644 --- a/server/middlewares/validators/videos.ts +++ b/server/middlewares/validators/videos.ts @@ -34,7 +34,7 @@ import { CONSTRAINTS_FIELDS } from '../../initializers' import { VideoShareModel } from '../../models/video/video-share' import { authenticate } from '../oauth' import { areValidationErrors } from './utils' -import { cleanUpReqFiles } from '../../helpers/utils' +import { cleanUpReqFiles } from '../../helpers/express-utils' import { VideoModel } from '../../models/video/video' import { UserModel } from '../../models/account/user' -- cgit v1.2.3