Temporary workaround to not depend on configuration changes

This commit is contained in:
Daniel García Aubert
2019-10-04 12:35:12 +02:00
parent a684bead92
commit 93edf07da8
4 changed files with 22 additions and 0 deletions
+5
View File
@@ -202,6 +202,11 @@ module.exports = class ApiRouter {
app.layergroupAffectedTablesCache = this.layergroupAffectedTablesCache;
}
// TODO: remove it before releasing next major version
if (!Array.isArray(routes)) {
routes = [ routes ];
}
routes.forEach(route => {
const apiRouter = router({ mergeParams: true });
const { paths, middlewares = [] } = route;