From 556ddc319242aafef51bae9301423ecf8701a3af Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 25 Aug 2017 18:36:49 +0200 Subject: Upgrade common server dependencies --- server/middlewares/validators/pods.ts | 2 +- server/middlewares/validators/videos.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'server/middlewares/validators') 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' function makeFriendsValidator (req: express.Request, res: express.Response, next: express.NextFunction) { // Force https if the administrator wants to make friends if (isTestInstance() === false && CONFIG.WEBSERVER.SCHEME === 'http') { - return res.status(400).send('Cannot make friends with a non HTTPS webserver.') + return res.status(400).send('Cannot make friends with a non HTTPS web server.') } 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: logger.debug('Checking videosAdd parameters', { parameters: req.body, files: req.files }) checkErrors(req, res, () => { - const videoFile = req.files.videofile[0] + const videoFile = req.files['videofile'][0] db.Video.getDurationFromFile(videoFile.path) .then(duration => { -- cgit v1.2.3