diff --git a/README.md b/README.md index c50027d3e..a3ee82f1f 100644 --- a/README.md +++ b/README.md @@ -144,6 +144,7 @@ All these environment variables can be set when using Docker or Docker Compose: | ------------------------------------ | -------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | | FINERACT_API_URLS | Fineract server list | https://sandbox.mifos.community,https://demo.mifos.community,https://localhost:8443 | | FINERACT_API_URL | Default Fineract server | https://localhost:8443 | +| FINERACT_API_ACTUATOR | Default Fineract Actuator endpoint | /fineract-provider | | FINERACT_PLATFORM_TENANT_IDENTIFIER | Default tenant identifier (must align with Fineract `tenants` table) | default | | FINERACT_PLATFORM_TENANTS_IDENTIFIER | Tenant identifier list (must align with Fineract `tenants` table) | - | diff --git a/src/app/system/version.service.ts b/src/app/system/version.service.ts index 2af264e4c..4ee838acd 100644 --- a/src/app/system/version.service.ts +++ b/src/app/system/version.service.ts @@ -5,13 +5,18 @@ import { HttpClient } from '@angular/common/http'; /** rxjs Imports */ import { Observable } from 'rxjs'; +/** Custom Services */ +import { environment } from '../../environments/environment'; + @Injectable({ providedIn: 'root' }) export class VersionService { private http = inject(HttpClient); + private apiActuator = environment.apiActuator; + getBackendInfo(): Observable { - return this.http.get('/fineract-provider/actuator/info'); + return this.http.get(this.apiActuator + '/actuator/info'); } } diff --git a/src/assets/env.js b/src/assets/env.js index 8755c99e6..f1df0cdff 100644 --- a/src/assets/env.js +++ b/src/assets/env.js @@ -7,6 +7,7 @@ window["env"]["apiProvider"] = ''; window["env"]["apiVersion"] = ''; + window["env"]["apiActuator"] = ''; window["env"]["fineractPlatformTenantId"] = ''; window["env"]["fineractPlatformTenantIds"] = ''; diff --git a/src/assets/env.template.js b/src/assets/env.template.js index ad212d178..e2784b7fc 100644 --- a/src/assets/env.template.js +++ b/src/assets/env.template.js @@ -7,6 +7,7 @@ window['env']['apiProvider'] = '$FINERACT_API_PROVIDER'; window['env']['apiVersion'] = '$FINERACT_API_VERSION'; + window['env']['apiActuator'] = '$FINERACT_API_ACTUATOR'; window['env']['fineractPlatformTenantId'] = '$FINERACT_PLATFORM_TENANT_IDENTIFIER'; window['env']['fineractPlatformTenantIds'] = '$FINERACT_PLATFORM_TENANTS_IDENTIFIER'; diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index ea49f3846..085e61e04 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -23,6 +23,7 @@ export const environment = { allowServerSwitch: loadedEnv.allowServerSwitch || 'true', apiProvider: loadedEnv['apiProvider'] || '/fineract-provider/api', apiVersion: loadedEnv['apiVersion'] || '/v1', + apiActuator: loadedEnv.apiActuator || '/fineract-provider', serverUrl: '', oauth: { enabled: loadedEnv['oauthServerEnabled'] || false, // For connecting to Mifos X using OAuth2 Authentication change the value to true diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 1f23d9070..9791b34f1 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -27,6 +27,7 @@ export const environment = { allowServerSwitch: loadedEnv.allowServerSwitch || 'true', apiProvider: loadedEnv.apiProvider || '/fineract-provider/api', apiVersion: loadedEnv.apiVersion || '/v1', + apiActuator: loadedEnv.apiActuator || '/fineract-provider', serverUrl: '', /** Feature flag for Remember Me functionality */ enableRememberMe: false,