changes in API_Explorer_Host name

This commit is contained in:
Reena-cell 2023-01-20 12:04:55 +01:00
parent df2efe52f6
commit d0f71cb399
4 changed files with 7 additions and 7 deletions

View File

@ -39,8 +39,8 @@ class ApiCollectionListView(IndexView, LoginRequiredMixin, FormView ):
api_collections_for_user = api.get(api_collections_for_user_url_path)
if 'api_collections' in api_collections_for_user:
apicollections_list.extend(api_collections_for_user['api_collections'])
for api_collection_id_with_locale in apicollections_list:
api_collection_id_with_locale["collection_on_api_explorer_url"] = f"{settings.API_EXPLORER}/?api-collection-id={api_collection_id_with_locale['api_collection_id']}"
for ac in apicollections_list:
ac["collection_on_api_explorer_url"] = f"{settings.API_EXPLORER_HOST}/?api-collection-id={ac['api_collection_id']}"
except APIError as err:
messages.error(self.request, err)
return []

View File

@ -32,8 +32,8 @@ class IndexView(LoginRequiredMixin, FormView):
error_once_only(self.request, response['message'])
else:
api_collections=response['api_collections']
for api_collection_id_with_locale in api_collections:
api_collection_id_with_locale["collection_on_api_explorer_url"] = f"{settings.API_EXPLORER}/?api-collection-id={api_collection_id_with_locale['api_collection_id']}"
for ac in api_collections:
ac["collection_on_api_explorer_url"] = f"{settings.API_EXPLORER_HOST}/?api-collection-id={ac['api_collection_id']}"
except APIError as err:
messages.error(self.request, err)
except Exception as err:

View File

@ -253,7 +253,7 @@ API_MANAGER_DATE_FORMAT= '%Y-%m-%d'
API_HOST = 'http://127.0.0.1:8080'
API_EXPLORER = 'http://127.0.0.1:8082'
API_EXPLORER_HOST = 'http://127.0.0.1:8082'
# Only override this if you have a separate portal instance
API_PORTAL = API_HOST
API_BASE_PATH = '/obp/v'

View File

@ -37,8 +37,8 @@ class IndexView(LoginRequiredMixin, FormView):
else:
dynamic_endpoints=response['dynamic_endpoints']
#Accessing API-Explorer URL, parameters API-Collection Id and selected Language eg. locale=en_GB (for English)
for locale in dynamic_endpoints:
locale["dynamicendpoint_on_api_explorer_url"] = f"{settings.API_EXPLORER}/?api-dynamic_endpoint-id={locale['dynamic_endpoint_id']}"
for ac in dynamic_endpoints:
ac["dynamicendpoint_on_api_explorer_url"] = f"{settings.API_EXPLORER_HOST}/?api-dynamic_endpoint-id={ac['dynamic_endpoint_id']}"
except APIError as err:
messages.error(self.request, err)
except Exception as err: