diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-03-16 22:29:27 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-03-16 22:29:27 +0100 |
commit | f0f5567b6918fc60c8cab15e13aec03a89a91dfb (patch) | |
tree | 99dfdb9fa8273c9cda1360fd3b6bfccc515bf8be /server/middlewares/reqValidators/utils.js | |
parent | 5101105ef91bfe478f97546b78b321882da2079c (diff) | |
download | PeerTube-f0f5567b6918fc60c8cab15e13aec03a89a91dfb.tar.gz PeerTube-f0f5567b6918fc60c8cab15e13aec03a89a91dfb.tar.zst PeerTube-f0f5567b6918fc60c8cab15e13aec03a89a91dfb.zip |
Use const/let now we use node 4.2
Diffstat (limited to 'server/middlewares/reqValidators/utils.js')
-rw-r--r-- | server/middlewares/reqValidators/utils.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/middlewares/reqValidators/utils.js b/server/middlewares/reqValidators/utils.js index 46c982571..05675c445 100644 --- a/server/middlewares/reqValidators/utils.js +++ b/server/middlewares/reqValidators/utils.js | |||
@@ -1,16 +1,16 @@ | |||
1 | 'use strict' | 1 | 'use strict' |
2 | 2 | ||
3 | var util = require('util') | 3 | const util = require('util') |
4 | 4 | ||
5 | var logger = require('../../helpers/logger') | 5 | const logger = require('../../helpers/logger') |
6 | 6 | ||
7 | var reqValidatorsUtils = { | 7 | const reqValidatorsUtils = { |
8 | checkErrors: checkErrors | 8 | checkErrors: checkErrors |
9 | } | 9 | } |
10 | 10 | ||
11 | function checkErrors (req, res, next, status_code) { | 11 | function checkErrors (req, res, next, status_code) { |
12 | if (status_code === undefined) status_code = 400 | 12 | if (status_code === undefined) status_code = 400 |
13 | var errors = req.validationErrors() | 13 | const errors = req.validationErrors() |
14 | 14 | ||
15 | if (errors) { | 15 | if (errors) { |
16 | logger.warn('Incorrect request parameters', { path: req.originalUrl, err: errors }) | 16 | logger.warn('Incorrect request parameters', { path: req.originalUrl, err: errors }) |