Fix data fetch 7

This commit is contained in:
Urtzi Alfaro
2025-07-27 22:58:18 +02:00
parent 0201b428e5
commit 946015b80c
8 changed files with 138 additions and 100 deletions

View File

@@ -64,6 +64,12 @@ async def proxy_tenant_weather(request: Request, tenant_id: str = Path(...), pat
target_path = f"/api/v1/tenants/{tenant_id}/weather/{path}".rstrip("/")
return await _proxy_to_data_service(request, target_path)
@router.api_route("/{tenant_id}/traffic/{path:path}", methods=["GET", "POST", "OPTIONS"])
async def proxy_tenant_traffic(request: Request, tenant_id: str = Path(...), path: str = ""):
"""Proxy tenant traffic requests to data service"""
target_path = f"/api/v1/tenants/{tenant_id}/traffic/{path}".rstrip("/")
return await _proxy_to_data_service(request, target_path)
@router.api_route("/{tenant_id}/analytics/{path:path}", methods=["GET", "POST", "OPTIONS"])
async def proxy_tenant_analytics(request: Request, tenant_id: str = Path(...), path: str = ""):
"""Proxy tenant analytics requests to data service"""