1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 10:19:35 +02:00

Update to standard 7. Goodbye snake_case, I used to love you

This commit is contained in:
Chocobozzz 2016-05-11 21:19:34 +02:00
parent 881a5e68b6
commit bc503c2a62
27 changed files with 349 additions and 351 deletions

View file

@ -8,13 +8,13 @@ const reqValidatorsUtils = {
checkErrors: checkErrors
}
function checkErrors (req, res, next, status_code) {
if (status_code === undefined) status_code = 400
function checkErrors (req, res, next, statusCode) {
if (statusCode === undefined) statusCode = 400
const errors = req.validationErrors()
if (errors) {
logger.warn('Incorrect request parameters', { path: req.originalUrl, err: errors })
return res.status(status_code).send('There have been validation errors: ' + util.inspect(errors))
return res.status(statusCode).send('There have been validation errors: ' + util.inspect(errors))
}
return next()