Place function closer to where is called
This commit is contained in:
@@ -175,6 +175,14 @@ LayergroupController.prototype.register = function(app) {
|
||||
);
|
||||
};
|
||||
|
||||
function validateLayerRouteMiddleware(req, res, next) {
|
||||
if (req.params.token === 'static') {
|
||||
return next('route');
|
||||
}
|
||||
|
||||
next();
|
||||
}
|
||||
|
||||
LayergroupController.prototype.analysisNodeStatus = function (analysisStatusBackend) {
|
||||
return function analysisNodeStatusMiddleware(req, res, next) {
|
||||
analysisStatusBackend.getNodeStatus(res.locals, (err, nodeStatus, stats) => {
|
||||
@@ -537,12 +545,3 @@ LayergroupController.prototype.getAffectedTables = function(user, dbName, layerg
|
||||
callback
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
function validateLayerRouteMiddleware(req, res, next) {
|
||||
if (req.params.token === 'static') {
|
||||
return next('route');
|
||||
}
|
||||
|
||||
next();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user