Restore current-token-dialog
[arvados-workbench2.git] / src / common / config.ts
index 061f9c00af0b91e5b1a92e5337ecda44492c2754..1ab73294b01bc9c742c8b52d17bb1c418d080dc9 100644 (file)
@@ -56,8 +56,10 @@ export const fetchConfig = () => {
         .get<ConfigJSON>(CONFIG_URL + "?nocache=" + (new Date()).getTime())
         .then(response => response.data)
         .catch(() => Promise.resolve(getDefaultConfig()))
-        .then(config => Axios.get<Config>(getDiscoveryURL(config.API_HOST)))
-        .then(response => response.data);
+        .then(config => Axios
+            .get<Config>(getDiscoveryURL(config.API_HOST))
+            .then(response => ({ config: response.data, apiHost: config.API_HOST })));
+
 };
 
 export const mockConfig = (config: Partial<Config>): Config => ({