Fineract URLs to use first item in the list as default if exists

This commit is contained in:
Jose Alberto Hernandez
2025-04-06 17:20:38 -05:00
parent 6ec7c9e774
commit ce858cb8cf
6 changed files with 47 additions and 36 deletions
+3 -1
View File
@@ -16,7 +16,9 @@ export const environment = {
loadedEnv['fineractApiUrls'] ||
'https://sandbox.mifos.community,https://demo.mifos.community,https://localhost:8443,' + window.location.origin,
// For connecting to server running elsewhere set the base API URL
baseApiUrl: loadedEnv['fineractApiUrl'] || window.location.origin,
baseApiUrl:
loadedEnv['fineractApiUrl'] ||
(loadedEnv['fineractApiUrls']?.length > 0 ? loadedEnv['fineractApiUrls'][0] : window.location.origin),
oauthServerUrl: loadedEnv['oauthServerUrl'] || loadedEnv['fineractApiUrl'] + loadedEnv['apiProvider'],
allowServerSwitch: env.allow_switching_backend_instance,
apiProvider: loadedEnv['apiProvider'] || '/fineract-provider/api',
+3 -1
View File
@@ -21,7 +21,9 @@ export const environment = {
loadedEnv['fineractApiUrls'] ||
'https://sandbox.mifos.community,https://demo.mifos.community,https://localhost:8443,' + window.location.origin,
// For connecting to server running elsewhere set the base API URL
baseApiUrl: loadedEnv['baseApiUrl'] || window.location.origin,
baseApiUrl:
loadedEnv['fineractApiUrl'] ||
(loadedEnv['fineractApiUrls']?.length > 0 ? loadedEnv['fineractApiUrls'][0] : window.location.origin),
allowServerSwitch: env.allow_switching_backend_instance,
apiProvider: loadedEnv['apiProvider'] || '/fineract-provider/api',
apiVersion: loadedEnv['apiVersion'] || '/v1',