Create .middlewares() method to mount corresponding set of middlewares
This commit is contained in:
@@ -31,8 +31,11 @@ module.exports = class AttributesLayergroupController {
|
||||
}
|
||||
|
||||
register (mapRouter) {
|
||||
mapRouter.get(
|
||||
`/:token/:layer/attributes/:fid`,
|
||||
mapRouter.get('/:token/:layer/attributes/:fid', this.middlewares());
|
||||
}
|
||||
|
||||
middlewares () {
|
||||
return [
|
||||
layergroupToken(),
|
||||
credentials(),
|
||||
authorize(this.authBackend),
|
||||
@@ -50,7 +53,7 @@ module.exports = class AttributesLayergroupController {
|
||||
cacheChannelHeader(),
|
||||
surrogateKeyHeader({ surrogateKeysCache: this.surrogateKeysCache }),
|
||||
lastModifiedHeader()
|
||||
);
|
||||
];
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user