Upload logo

This commit is contained in:
2025-02-03 16:11:01 +01:00
parent 0477c8ec44
commit 4fd043ecfb
6 changed files with 17 additions and 1 deletions

View File

@@ -52,3 +52,17 @@ async def get_room_sessions(room_name: str):
)
response.raise_for_status()
return response.json()
async def upload_logo(room_name: str, logo_path: str):
async with httpx.AsyncClient() as client:
with open(logo_path, "rb") as f:
response = await client.put(
f"{settings.WHEREBY_API_URL}/rooms{room_name}/theme/logo",
headers={
"Authorization": f"Bearer {settings.WHEREBY_API_KEY}",
},
timeout=TIMEOUT,
files={"image": f},
)
response.raise_for_status()