From 66f964678ce06811bdc11d1b3a9b2e947081eef9 Mon Sep 17 00:00:00 2001 From: cheykrym Date: Sun, 29 Jun 2025 06:10:06 +0300 Subject: [PATCH] patch profile --- common_lib/services/profile.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common_lib/services/profile.py b/common_lib/services/profile.py index 81f9e62..87a9195 100644 --- a/common_lib/services/profile.py +++ b/common_lib/services/profile.py @@ -25,13 +25,15 @@ async def get_profile_by_user_id(user_id: UUID, token: str) -> dict: raise HTTPException(status_code=status.HTTP_503_SERVICE_UNAVAILABLE, detail=f"profile_service unreachable: {str(e)}") -async def get_profiles_by_user_ids(user_ids: List[UUID], token: str) -> Dict[str, dict]: +async def get_profiles_by_user_ids(user_ids: List[UUID], token: str, user_agent: str, ip: str) -> Dict[str, dict]: try: async with httpx.AsyncClient(timeout=5.0, verify=False) as client: response = await client.post( f"{settings.PROFILE_SERVICE}/user_ids/internal", headers={"Authorization": f"Bearer {token}"}, - json={"user_ids": user_ids} + json={"user_ids": user_ids, + "user_agent": user_agent, + "ip": ip} ) if response.status_code != 200: