Create .middlwares() to return a set of middlewares to be mounted
This commit is contained in:
parent
d86a839265
commit
07dec2e641
@ -16,8 +16,11 @@ module.exports = class AnalysisLayergroupController {
|
||||
}
|
||||
|
||||
register (mapRouter) {
|
||||
mapRouter.get(
|
||||
`/:token/analysis/node/:nodeId`,
|
||||
mapRouter.get('/:token/analysis/node/:nodeId', this.middlewares());
|
||||
}
|
||||
|
||||
middlewares () {
|
||||
return [
|
||||
layergroupToken(),
|
||||
credentials(),
|
||||
authorize(this.authBackend),
|
||||
@ -25,7 +28,7 @@ module.exports = class AnalysisLayergroupController {
|
||||
rateLimit(this.userLimitsBackend, RATE_LIMIT_ENDPOINTS_GROUPS.ANALYSIS),
|
||||
cleanUpQueryParams(),
|
||||
analysisNodeStatus(this.analysisStatusBackend)
|
||||
);
|
||||
];
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user