Skip to content

Commit

Permalink
Merge pull request #2 from PADAS/gundi-3562-er-url-cleanup
Browse files Browse the repository at this point in the history
GUNDI-3562: Cleanup ER urls
  • Loading branch information
marianobrc authored Nov 21, 2024
2 parents 70f6c90 + 908c829 commit 6e67ec3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/actions/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ async def action_auth(integration: Integration, action_config: AuthenticateConfi
auth_config = action_config
url_parse = urlparse(integration.base_url)
async with AsyncERClient(
service_root=f"{integration.base_url}/api/v1.0",
service_root=f"{url_parse.scheme}://{url_parse.hostname}/api/v1.0",
username=auth_config.username,
password=auth_config.password,
token=auth_config.token,
Expand Down Expand Up @@ -57,7 +57,7 @@ async def action_pull_events(integration: Integration, action_config: PullEvents
# Prepare the ER client to extract events
url_parse = urlparse(integration.base_url)
er_client = AsyncERClient(
service_root=f"{integration.base_url}/api/v1.0",
service_root=f"{url_parse.scheme}://{url_parse.hostname}/api/v1.0",
username=auth_config.username or None,
password=auth_config.password or None,
token=auth_config.token,
Expand Down Expand Up @@ -121,7 +121,7 @@ async def action_pull_observations(integration: Integration, action_config: Pull
# Prepare the ER client to extract events
url_parse = urlparse(integration.base_url)
er_client = AsyncERClient(
service_root=f"{integration.base_url}/api/v1.0",
service_root=f"{url_parse.scheme}://{url_parse.hostname}/api/v1.0",
username=auth_config.username or None,
password=auth_config.password or None,
token=auth_config.token,
Expand Down

0 comments on commit 6e67ec3

Please sign in to comment.