diff --git a/.vscode/settings.json b/.vscode/settings.json index 561b2f4..4ef3e8b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,6 +3,7 @@ "cSpell.words": [ "ABES", "autoplay", + "cloudfunctions", "firestore", "fishsample", "fullscreen", diff --git a/_src/app/config.js b/_src/app/config.js index f929a04..483ae67 100644 --- a/_src/app/config.js +++ b/_src/app/config.js @@ -16,27 +16,23 @@ define([ SimpleFillSymbol, SimpleLineSymbol ) { - let agsDomain; // electrofishing-query.*.utah.gov let apiKey = 'AGRC-E029C84C956966'; let quadWord; let databaseName = 'Electrofishing'; let dataEntryApp = 'https://electrofishing.ugrc.utah.gov'; - let baseUrl; const projectId = window.dojoConfig?.isJasmineTestRunner ? 'test' : JSON.parse(process.env.FIREBASE_CONFIG).projectId; + let agsDomain = `us-central1-${projectId}.cloudfunctions.net`; + let baseUrl = `https://${agsDomain}/maps`; if (has('agrc-build') === 'prod') { // *.ugrc.utah.gov quadWord = 'dinner-oregano-india-bahama'; - agsDomain = 'wrimaps.utah.gov'; - baseUrl = `https://us-central1-${projectId}.cloudfunctions.net/maps`; } else if (has('agrc-build') === 'stage') { // *.dev.utah.gov quadWord = 'wedding-tactic-enrico-yes'; - agsDomain = 'wrimaps.at.utah.gov'; dataEntryApp = 'https://electrofishing.dev.utah.gov'; - baseUrl = `https://us-central1-${projectId}.cloudfunctions.net/maps`; } else { // localhost // agsDomain = window.location.host; @@ -58,8 +54,6 @@ define([ // global reference to App app: null, - agsDomain, - dataEntryApp, databaseName,