mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 17:59:37 +02:00
Use const/let now we use node 4.2
This commit is contained in:
parent
5101105ef9
commit
f0f5567b69
36 changed files with 424 additions and 432 deletions
|
@ -1,16 +1,16 @@
|
|||
'use strict'
|
||||
|
||||
var util = require('util')
|
||||
const util = require('util')
|
||||
|
||||
var logger = require('../../helpers/logger')
|
||||
const logger = require('../../helpers/logger')
|
||||
|
||||
var reqValidatorsUtils = {
|
||||
const reqValidatorsUtils = {
|
||||
checkErrors: checkErrors
|
||||
}
|
||||
|
||||
function checkErrors (req, res, next, status_code) {
|
||||
if (status_code === undefined) status_code = 400
|
||||
var errors = req.validationErrors()
|
||||
const errors = req.validationErrors()
|
||||
|
||||
if (errors) {
|
||||
logger.warn('Incorrect request parameters', { path: req.originalUrl, err: errors })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue