diff options
Diffstat (limited to 'server/middlewares/validators/videos.js')
-rw-r--r-- | server/middlewares/validators/videos.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/middlewares/validators/videos.js b/server/middlewares/validators/videos.js index 3e2af06fb..422f3642f 100644 --- a/server/middlewares/validators/videos.js +++ b/server/middlewares/validators/videos.js | |||
@@ -4,7 +4,7 @@ const mongoose = require('mongoose') | |||
4 | 4 | ||
5 | const checkErrors = require('./utils').checkErrors | 5 | const checkErrors = require('./utils').checkErrors |
6 | const constants = require('../../initializers/constants') | 6 | const constants = require('../../initializers/constants') |
7 | const customValidators = require('../../helpers/custom-validators') | 7 | const customVideosValidators = require('../../helpers/custom-validators').videos |
8 | const logger = require('../../helpers/logger') | 8 | const logger = require('../../helpers/logger') |
9 | 9 | ||
10 | const Video = mongoose.model('Video') | 10 | const Video = mongoose.model('Video') |
@@ -33,8 +33,8 @@ function videosAdd (req, res, next) { | |||
33 | return res.status(400).send('Cannot retrieve metadata of the file.') | 33 | return res.status(400).send('Cannot retrieve metadata of the file.') |
34 | } | 34 | } |
35 | 35 | ||
36 | if (!customValidators.isVideoDurationValid(duration)) { | 36 | if (!customVideosValidators.isVideoDurationValid(duration)) { |
37 | return res.status(400).send('Duration of the video file is too big (max: ' + constants.VIDEOS_CONSTRAINTS_FIELDS.DURATION.max + 's).') | 37 | return res.status(400).send('Duration of the video file is too big (max: ' + constants.CONSTRAINTS_FIELDS.VIDEOS.DURATION.max + 's).') |
38 | } | 38 | } |
39 | 39 | ||
40 | videoFile.duration = duration | 40 | videoFile.duration = duration |