Pass FILE_VIEWERS_CONFIG_URL to configuration
authorMichal Klobukowski <michal.klobukowski@contractors.roche.com>
Thu, 13 Dec 2018 13:57:27 +0000 (14:57 +0100)
committerMichal Klobukowski <michal.klobukowski@contractors.roche.com>
Thu, 13 Dec 2018 13:57:27 +0000 (14:57 +0100)
Feature #13540

Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski@contractors.roche.com>

src/common/config.ts

index 4d96bbbf2ea3029681529fda4941028a8a07ecd5..db67ed8dceec9fc06837945cba4a820682a642af 100644 (file)
@@ -60,10 +60,15 @@ export const fetchConfig = () => {
         .catch(() => Promise.resolve(getDefaultConfig()))
         .then(config => Axios
             .get<Config>(getDiscoveryURL(config.API_HOST))
-            .then(response => ({ 
+            .then(response => ({
                 // TODO: After tests delete `|| '/vocabulary-example.json'`
-                config: {...response.data, vocabularyUrl: config.VOCABULARY_URL || '/vocabulary-example.json' }, 
-                apiHost: config.API_HOST, 
+                // TODO: After tests delete `|| '/file-viewers-example.json'`
+                config: {
+                    ...response.data,
+                    vocabularyUrl: config.VOCABULARY_URL || '/vocabulary-example.json',
+                    fileViewersConfigUrl: config.FILE_VIEWERS_CONFIG_URL || '/file-viewers-example.json'
+                },
+                apiHost: config.API_HOST,
             })));
 
 };