Merge pull request #1129 from CartoDB/fix-routes-config

Convert from v1 to api in routes config
This commit is contained in:
Daniel G. Aubert 2019-10-07 17:34:00 +02:00 committed by GitHub
commit 9e23b91f3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 ];
}