This commit is contained in:
cheykrym 2025-06-29 06:16:26 +03:00
parent 9eca7fe098
commit 24bb1d70bf

View File

@ -25,15 +25,14 @@ 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, user_agent: str, ip: str) -> Dict[str, dict]:
async def get_profiles_by_user_ids(user_ids: List[UUID], token: str, user_id: UUID) -> 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,
"user_agent": user_agent,
"ip": ip}
"user_id": user_id}
)
if response.status_code != 200: