diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-08-25 18:36:49 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-08-25 18:36:49 +0200 |
commit | 556ddc319242aafef51bae9301423ecf8701a3af (patch) | |
tree | 413829b522193584df348f0356a702b3222c3419 /server/middlewares/validators | |
parent | d15ab38a905e6b50972e6f884917db9198279daf (diff) | |
download | PeerTube-556ddc319242aafef51bae9301423ecf8701a3af.tar.gz PeerTube-556ddc319242aafef51bae9301423ecf8701a3af.tar.zst PeerTube-556ddc319242aafef51bae9301423ecf8701a3af.zip |
Upgrade common server dependencies
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r-- | server/middlewares/validators/pods.ts | 2 | ||||
-rw-r--r-- | server/middlewares/validators/videos.ts | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/server/middlewares/validators/pods.ts b/server/middlewares/validators/pods.ts index d0981cd57..4d0e054b0 100644 --- a/server/middlewares/validators/pods.ts +++ b/server/middlewares/validators/pods.ts | |||
@@ -11,7 +11,7 @@ import { isTestInstance } from '../../helpers' | |||
11 | function makeFriendsValidator (req: express.Request, res: express.Response, next: express.NextFunction) { | 11 | function makeFriendsValidator (req: express.Request, res: express.Response, next: express.NextFunction) { |
12 | // Force https if the administrator wants to make friends | 12 | // Force https if the administrator wants to make friends |
13 | if (isTestInstance() === false && CONFIG.WEBSERVER.SCHEME === 'http') { | 13 | if (isTestInstance() === false && CONFIG.WEBSERVER.SCHEME === 'http') { |
14 | return res.status(400).send('Cannot make friends with a non HTTPS webserver.') | 14 | return res.status(400).send('Cannot make friends with a non HTTPS web server.') |
15 | } | 15 | } |
16 | 16 | ||
17 | req.checkBody('hosts', 'Should have an array of unique hosts').isEachUniqueHostValid() | 17 | req.checkBody('hosts', 'Should have an array of unique hosts').isEachUniqueHostValid() |
diff --git a/server/middlewares/validators/videos.ts b/server/middlewares/validators/videos.ts index bd223a1cb..29c1ee0ef 100644 --- a/server/middlewares/validators/videos.ts +++ b/server/middlewares/validators/videos.ts | |||
@@ -24,7 +24,7 @@ function videosAddValidator (req: express.Request, res: express.Response, next: | |||
24 | logger.debug('Checking videosAdd parameters', { parameters: req.body, files: req.files }) | 24 | logger.debug('Checking videosAdd parameters', { parameters: req.body, files: req.files }) |
25 | 25 | ||
26 | checkErrors(req, res, () => { | 26 | checkErrors(req, res, () => { |
27 | const videoFile = req.files.videofile[0] | 27 | const videoFile = req.files['videofile'][0] |
28 | 28 | ||
29 | db.Video.getDurationFromFile(videoFile.path) | 29 | db.Video.getDurationFromFile(videoFile.path) |
30 | .then(duration => { | 30 | .then(duration => { |