Use early retutn node pattern
This commit is contained in:
parent
d5c552a03a
commit
a585ba5480
@ -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();
|
||||
}
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user