From fe27d3adbf6261eb6d900bc4dc00f70483097ee6 Mon Sep 17 00:00:00 2001 From: Jonni Date: Mon, 16 Dec 2024 10:50:29 +0000 Subject: [PATCH] chore: use correct path to fetch --- .../src/lib/financialStatementsInao.config.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libs/clients/financial-statements-inao/src/lib/financialStatementsInao.config.ts b/libs/clients/financial-statements-inao/src/lib/financialStatementsInao.config.ts index 56487d0eccaf..89d8e99c8b8d 100644 --- a/libs/clients/financial-statements-inao/src/lib/financialStatementsInao.config.ts +++ b/libs/clients/financial-statements-inao/src/lib/financialStatementsInao.config.ts @@ -1,11 +1,15 @@ import { defineConfig } from '@island.is/nest/config' +import { isRunningOnEnvironment } from '@island.is/shared/utils' +const isLocal = isRunningOnEnvironment('local') export const FinancialStatementsInaoClientConfig = defineConfig({ name: 'DataverseClient', load: (env) => ({ basePath: env.required( 'FINANCIAL_STATEMENTS_INAO_BASE_PATH', - 'https://dev-re.crm4.dynamics.com/api/data/v9.1', + isLocal + ? 'https://dev-re.crm4.dynamics.com/api/data/v9.1' + : 'https://star-re.crm4.dynamics.com/api/data/v9.1', ), issuer: env.required( 'FINANCIAL_STATEMENTS_INAO_ISSUER', @@ -13,7 +17,9 @@ export const FinancialStatementsInaoClientConfig = defineConfig({ ), scope: env.required( 'FINANCIAL_STATEMENTS_INAO_SCOPE', - 'https://dev-re.crm4.dynamics.com/.default', + isLocal + ? 'https://dev-re.crm4.dynamics.com/.default' + : 'https://star-re.crm4.dynamics.com/.default', ), tokenEndpoint: env.required( 'FINANCIAL_STATEMENTS_INAO_TOKEN_ENDPOINT',