diff options
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r-- | server/middlewares/validators/videos.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/middlewares/validators/videos.ts b/server/middlewares/validators/videos.ts index bc8b7e541..5f213f974 100644 --- a/server/middlewares/validators/videos.ts +++ b/server/middlewares/validators/videos.ts | |||
@@ -19,7 +19,8 @@ import { | |||
19 | isVideoNSFWValid, | 19 | isVideoNSFWValid, |
20 | isVideoIdOrUUIDValid, | 20 | isVideoIdOrUUIDValid, |
21 | isVideoAbuseReasonValid, | 21 | isVideoAbuseReasonValid, |
22 | isVideoRatingTypeValid | 22 | isVideoRatingTypeValid, |
23 | getDurationFromVideoFile | ||
23 | } from '../../helpers' | 24 | } from '../../helpers' |
24 | import { VideoInstance } from '../../models' | 25 | import { VideoInstance } from '../../models' |
25 | 26 | ||
@@ -50,7 +51,7 @@ const videosAddValidator = [ | |||
50 | return undefined | 51 | return undefined |
51 | } | 52 | } |
52 | 53 | ||
53 | return db.Video.getDurationFromFile(videoFile.path) | 54 | return getDurationFromVideoFile(videoFile.path) |
54 | .catch(err => { | 55 | .catch(err => { |
55 | logger.error('Invalid input file in videosAddValidator.', err) | 56 | logger.error('Invalid input file in videosAddValidator.', err) |
56 | res.status(400) | 57 | res.status(400) |