Use early retutn node pattern

This commit is contained in:
Daniel García Aubert 2017-11-17 18:07:19 +01:00
parent d5c552a03a
commit a585ba5480

View File

@ -92,11 +92,11 @@ AnalysesController.prototype.catalog = function (req, res, next) {
err.http_status = 401;
}
next(err);
} else {
res.body = { catalog: catalogWithTables };
next();
return next(err);
}
res.body = { catalog: catalogWithTables };
next();
}
);
};