diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-05-11 21:19:34 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-05-13 14:23:11 +0200 |
commit | bc503c2a62dcf9aed6b8d90b68f0f27a7755ac01 (patch) | |
tree | a1fe1ad88afd29ee4d7cb05c480649d5a9c6f9a0 /server/middlewares/reqValidators/utils.js | |
parent | 881a5e68b64e4acd43408852bbdc914643d8fac6 (diff) | |
download | PeerTube-bc503c2a62dcf9aed6b8d90b68f0f27a7755ac01.tar.gz PeerTube-bc503c2a62dcf9aed6b8d90b68f0f27a7755ac01.tar.zst PeerTube-bc503c2a62dcf9aed6b8d90b68f0f27a7755ac01.zip |
Update to standard 7. Goodbye snake_case, I used to love you
Diffstat (limited to 'server/middlewares/reqValidators/utils.js')
-rw-r--r-- | server/middlewares/reqValidators/utils.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/middlewares/reqValidators/utils.js b/server/middlewares/reqValidators/utils.js index 05675c445..198ed8d26 100644 --- a/server/middlewares/reqValidators/utils.js +++ b/server/middlewares/reqValidators/utils.js | |||
@@ -8,13 +8,13 @@ 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, statusCode) { |
12 | if (status_code === undefined) status_code = 400 | 12 | if (statusCode === undefined) statusCode = 400 |
13 | const 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 }) |
17 | return res.status(status_code).send('There have been validation errors: ' + util.inspect(errors)) | 17 | return res.status(statusCode).send('There have been validation errors: ' + util.inspect(errors)) |
18 | } | 18 | } |
19 | 19 | ||
20 | return next() | 20 | return next() |