diff --git a/lib/server-options.js b/lib/server-options.js index 95a3dd7d..5dc7b72d 100644 --- a/lib/server-options.js +++ b/lib/server-options.js @@ -81,7 +81,12 @@ const routesConfig = global.environment.routes || { }] }; -if (!Array.isArray(routesConfig.api)) { +if (routesConfig.v1 && !Array.isArray(routesConfig.v1)) { + routesConfig.api = [ routesConfig.v1 ]; + delete routesConfig.v1; +} + +if (routesConfig.api && !Array.isArray(routesConfig.api)) { routesConfig.api = [ routesConfig.api ]; }