From 3e753302d8c911b59971c16a8018df0e1ab78465 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 23 Jul 2019 10:40:39 +0200 Subject: Refactor middleware helpers --- server/middlewares/validators/videos/videos.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'server/middlewares/validators/videos/videos.ts') diff --git a/server/middlewares/validators/videos/videos.ts b/server/middlewares/validators/videos/videos.ts index 5593ede64..8f5e5c95c 100644 --- a/server/middlewares/validators/videos/videos.ts +++ b/server/middlewares/validators/videos/videos.ts @@ -13,9 +13,6 @@ import { toValueOrNull } from '../../../helpers/custom-validators/misc' import { - checkUserCanManageVideo, - doesVideoChannelOfAccountExist, - doesVideoExist, isScheduleVideoUpdatePrivacyValid, isVideoCategoryValid, isVideoDescriptionValid, @@ -33,7 +30,7 @@ import { import { getDurationFromVideoFile } from '../../../helpers/ffmpeg-utils' import { logger } from '../../../helpers/logger' import { CONSTRAINTS_FIELDS } from '../../../initializers/constants' -import { authenticate, authenticatePromiseIfNeeded } from '../../oauth' +import { authenticatePromiseIfNeeded } from '../../oauth' import { areValidationErrors } from '../utils' import { cleanUpReqFiles } from '../../../helpers/express-utils' import { VideoModel } from '../../../models/video/video' @@ -46,6 +43,7 @@ import { getServerActor } from '../../../helpers/utils' import { CONFIG } from '../../../initializers/config' import { isLocalVideoAccepted } from '../../../lib/moderation' import { Hooks } from '../../../lib/plugins/hooks' +import { checkUserCanManageVideo, doesVideoChannelOfAccountExist, doesVideoExist } from '../../../helpers/middlewares' const videosAddValidator = getCommonVideoEditAttributes().concat([ body('videofile') -- cgit v1.2.3