need_rating

This commit is contained in:
cheykrym 2026-04-03 01:27:28 +03:00
parent 306f52bc4b
commit 61bf1919a5
2 changed files with 6 additions and 4 deletions

View File

@ -27,7 +27,7 @@ from common_lib.utils.http_client import client
# except httpx.RequestError:
# raise HTTPException(status_code=status.HTTP_503_SERVICE_UNAVAILABLE, detail="Token service unavailable")
async def get_profile_by_user_id(user_id: UUID, current_user: UUID, full_profile: bool, with_permissions: bool) -> dict:
async def get_profile_by_user_id(user_id: UUID, current_user: UUID, full_profile: bool, with_permissions: bool, need_rating: bool) -> dict:
try:
# async with httpx.AsyncClient(transport=ssl_transport, timeout=5.0) as client:
response = await client.post(
@ -35,7 +35,8 @@ async def get_profile_by_user_id(user_id: UUID, current_user: UUID, full_profile
json={"user_id": str(user_id),
"current_user": str(current_user),
"full_profile": full_profile,
"with_permissions": with_permissions
"with_permissions": with_permissions,
"need_rating": need_rating
})
if response.status_code != 200:
@ -51,7 +52,7 @@ async def get_profile_by_user_id(user_id: UUID, current_user: UUID, full_profile
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], user_id: UUID, full_profile: bool, with_permissions: bool) -> Dict[str, dict]:
async def get_profiles_by_user_ids(user_ids: List[UUID], user_id: UUID, full_profile: bool, with_permissions: bool, need_rating: bool) -> Dict[str, dict]:
try:
# async with httpx.AsyncClient(transport=ssl_transport, timeout=5.0) as client:
response = await client.post(
@ -60,6 +61,7 @@ async def get_profiles_by_user_ids(user_ids: List[UUID], user_id: UUID, full_pro
"user_id": str(user_id),
"full_profile": full_profile,
"with_permissions": with_permissions
"need_rating": need_rating
})
if response.status_code != 200:

View File

@ -1,6 +1,6 @@
[project]
name = "common-lib"
version = "0.0.52"
version = "0.0.53"
description = "Библиотека общих компонентов для микросервисов yobble"
authors = [{ name = "cheykrym", email = "you@example.com" }]
license = "MIT"