let & const vars

This commit is contained in:
Simon Martín 2018-03-28 13:52:45 +02:00
parent adab7f21d8
commit db6ab4a591

View File

@ -1,4 +1,4 @@
var errorHandlerFactory = require('../services/error_handler_factory'); const errorHandlerFactory = require('../services/error_handler_factory');
module.exports = function errorMiddleware() { module.exports = function errorMiddleware() {
return function error(err, req, res, next) { return function error(err, req, res, next) {
@ -41,8 +41,7 @@ module.exports = function errorMiddleware() {
}; };
function getStatusError(errorHandler, req) { function getStatusError(errorHandler, req) {
let statusError = errorHandler.http_status;
var statusError = errorHandler.http_status;
// JSONP has to return 200 status error // JSONP has to return 200 status error
if (req && req.query && req.query.callback) { if (req && req.query && req.query.callback) {