Temporary workaround to not depend on configuration changes
This commit is contained in:
@@ -33,6 +33,12 @@ module.exports = function createServer (serverOptions) {
|
||||
app.set('json replacer', jsonReplacer());
|
||||
|
||||
const apiRouter = new ApiRouter({ serverOptions, environmentOptions: global.environment });
|
||||
|
||||
// TODO: remove it before releasing next major version
|
||||
if (!Array.isArray(serverOptions.routes.api)) {
|
||||
serverOptions.routes.api = [ serverOptions.routes.api ];
|
||||
}
|
||||
|
||||
apiRouter.route(app, serverOptions.routes.api);
|
||||
|
||||
const versions = getAndValidateVersions(serverOptions);
|
||||
|
||||
Reference in New Issue
Block a user