diff options
author | Chocobozzz <me@florianbigard.com> | 2019-07-23 10:40:39 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-07-24 10:58:16 +0200 |
commit | 3e753302d8c911b59971c16a8018df0e1ab78465 (patch) | |
tree | efce7ece3273589228c5c948ea6757b2bdf65429 /server/middlewares/validators/videos/videos.ts | |
parent | a8b666e9f1ed002230869606308749614390c82f (diff) | |
download | PeerTube-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.ts | 6 |
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' |
15 | import { | 15 | import { |
16 | checkUserCanManageVideo, | ||
17 | doesVideoChannelOfAccountExist, | ||
18 | doesVideoExist, | ||
19 | isScheduleVideoUpdatePrivacyValid, | 16 | isScheduleVideoUpdatePrivacyValid, |
20 | isVideoCategoryValid, | 17 | isVideoCategoryValid, |
21 | isVideoDescriptionValid, | 18 | isVideoDescriptionValid, |
@@ -33,7 +30,7 @@ import { | |||
33 | import { getDurationFromVideoFile } from '../../../helpers/ffmpeg-utils' | 30 | import { getDurationFromVideoFile } from '../../../helpers/ffmpeg-utils' |
34 | import { logger } from '../../../helpers/logger' | 31 | import { logger } from '../../../helpers/logger' |
35 | import { CONSTRAINTS_FIELDS } from '../../../initializers/constants' | 32 | import { CONSTRAINTS_FIELDS } from '../../../initializers/constants' |
36 | import { authenticate, authenticatePromiseIfNeeded } from '../../oauth' | 33 | import { authenticatePromiseIfNeeded } from '../../oauth' |
37 | import { areValidationErrors } from '../utils' | 34 | import { areValidationErrors } from '../utils' |
38 | import { cleanUpReqFiles } from '../../../helpers/express-utils' | 35 | import { cleanUpReqFiles } from '../../../helpers/express-utils' |
39 | import { VideoModel } from '../../../models/video/video' | 36 | import { VideoModel } from '../../../models/video/video' |
@@ -46,6 +43,7 @@ import { getServerActor } from '../../../helpers/utils' | |||
46 | import { CONFIG } from '../../../initializers/config' | 43 | import { CONFIG } from '../../../initializers/config' |
47 | import { isLocalVideoAccepted } from '../../../lib/moderation' | 44 | import { isLocalVideoAccepted } from '../../../lib/moderation' |
48 | import { Hooks } from '../../../lib/plugins/hooks' | 45 | import { Hooks } from '../../../lib/plugins/hooks' |
46 | import { checkUserCanManageVideo, doesVideoChannelOfAccountExist, doesVideoExist } from '../../../helpers/middlewares' | ||
49 | 47 | ||
50 | const videosAddValidator = getCommonVideoEditAttributes().concat([ | 48 | const videosAddValidator = getCommonVideoEditAttributes().concat([ |
51 | body('videofile') | 49 | body('videofile') |