From 1e7fd0be09609570738b8021cf224a2f98cf1d78 Mon Sep 17 00:00:00 2001 From: Soof Golan Date: Thu, 10 Oct 2024 22:44:49 +0100 Subject: [PATCH] fix kwarg --- server/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/main.py b/server/main.py index 2de99b4..21665f4 100644 --- a/server/main.py +++ b/server/main.py @@ -60,7 +60,11 @@ async def lifespan(_app: fastapi.FastAPI) -> typing.AsyncIterator[State]: session_maker = async_sessionmaker(engine) try: await db_connection_check(engine) - async with httpx.AsyncClient("https://api.github.com") as gh_http_client, httpx.AsyncClient("https://challenges.cloudflare.com") as cf_http_client: + async with httpx.AsyncClient( + base_url="https://api.github.com" + ) as gh_http_client, httpx.AsyncClient( + base_url="https://challenges.cloudflare.com" + ) as cf_http_client: yield { "gh_http_client": gh_http_client, "cf_http_client": cf_http_client,