aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/videos.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-10-09 11:06:13 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-10-09 11:17:36 +0200
commit14d3270f363245d2c83fcc2ac109e39743b5627e (patch)
tree22a1d40675d372d53c35a4d7adf1fc1b4ceb1799 /server/middlewares/validators/videos.ts
parentaa8b6df4a51c82eb91e6fd71a090b2128098af6b (diff)
downloadPeerTube-14d3270f363245d2c83fcc2ac109e39743b5627e.tar.gz
PeerTube-14d3270f363245d2c83fcc2ac109e39743b5627e.tar.zst
PeerTube-14d3270f363245d2c83fcc2ac109e39743b5627e.zip
Change how we handle resolution
It was an enum before, now we just use video height
Diffstat (limited to 'server/middlewares/validators/videos.ts')
-rw-r--r--server/middlewares/validators/videos.ts5
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'
24import { VideoInstance } from '../../models' 25import { 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)