X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/964b7f2cea81f087bbaddc94c9eeb08bab945742..12fbb73269d10424383cdbd712201498cc8d013a:/src/common/config.ts diff --git a/src/common/config.ts b/src/common/config.ts index 061f9c00..1ab73294 100644 --- a/src/common/config.ts +++ b/src/common/config.ts @@ -56,8 +56,10 @@ export const fetchConfig = () => { .get(CONFIG_URL + "?nocache=" + (new Date()).getTime()) .then(response => response.data) .catch(() => Promise.resolve(getDefaultConfig())) - .then(config => Axios.get(getDiscoveryURL(config.API_HOST))) - .then(response => response.data); + .then(config => Axios + .get(getDiscoveryURL(config.API_HOST)) + .then(response => ({ config: response.data, apiHost: config.API_HOST }))); + }; export const mockConfig = (config: Partial): Config => ({