aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/videos/videos.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-07-23 10:40:39 +0200
committerChocobozzz <chocobozzz@cpy.re>2019-07-24 10:58:16 +0200
commit3e753302d8c911b59971c16a8018df0e1ab78465 (patch)
treeefce7ece3273589228c5c948ea6757b2bdf65429 /server/middlewares/validators/videos/videos.ts
parenta8b666e9f1ed002230869606308749614390c82f (diff)
downloadPeerTube-3e753302d8c911b59971c16a8018df0e1ab78465.tar.gz
PeerTube-3e753302d8c911b59971c16a8018df0e1ab78465.tar.zst
PeerTube-3e753302d8c911b59971c16a8018df0e1ab78465.zip
Refactor middleware helpers
Diffstat (limited to 'server/middlewares/validators/videos/videos.ts')
-rw-r--r--server/middlewares/validators/videos/videos.ts6
1 files changed, 2 insertions, 4 deletions
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 {
13 toValueOrNull 13 toValueOrNull
14} from '../../../helpers/custom-validators/misc' 14} from '../../../helpers/custom-validators/misc'
15import { 15import {
16 checkUserCanManageVideo,
17 doesVideoChannelOfAccountExist,
18 doesVideoExist,
19 isScheduleVideoUpdatePrivacyValid, 16 isScheduleVideoUpdatePrivacyValid,
20 isVideoCategoryValid, 17 isVideoCategoryValid,
21 isVideoDescriptionValid, 18 isVideoDescriptionValid,
@@ -33,7 +30,7 @@ import {
33import { getDurationFromVideoFile } from '../../../helpers/ffmpeg-utils' 30import { getDurationFromVideoFile } from '../../../helpers/ffmpeg-utils'
34import { logger } from '../../../helpers/logger' 31import { logger } from '../../../helpers/logger'
35import { CONSTRAINTS_FIELDS } from '../../../initializers/constants' 32import { CONSTRAINTS_FIELDS } from '../../../initializers/constants'
36import { authenticate, authenticatePromiseIfNeeded } from '../../oauth' 33import { authenticatePromiseIfNeeded } from '../../oauth'
37import { areValidationErrors } from '../utils' 34import { areValidationErrors } from '../utils'
38import { cleanUpReqFiles } from '../../../helpers/express-utils' 35import { cleanUpReqFiles } from '../../../helpers/express-utils'
39import { VideoModel } from '../../../models/video/video' 36import { VideoModel } from '../../../models/video/video'
@@ -46,6 +43,7 @@ import { getServerActor } from '../../../helpers/utils'
46import { CONFIG } from '../../../initializers/config' 43import { CONFIG } from '../../../initializers/config'
47import { isLocalVideoAccepted } from '../../../lib/moderation' 44import { isLocalVideoAccepted } from '../../../lib/moderation'
48import { Hooks } from '../../../lib/plugins/hooks' 45import { Hooks } from '../../../lib/plugins/hooks'
46import { checkUserCanManageVideo, doesVideoChannelOfAccountExist, doesVideoExist } from '../../../helpers/middlewares'
49 47
50const videosAddValidator = getCommonVideoEditAttributes().concat([ 48const videosAddValidator = getCommonVideoEditAttributes().concat([
51 body('videofile') 49 body('videofile')