From 61bf1919a5bcd4b97eb26ec3b4e568b44484d225 Mon Sep 17 00:00:00 2001 From: cheykrym Date: Fri, 3 Apr 2026 01:27:28 +0300 Subject: [PATCH] need_rating --- common_lib/services/profile.py | 8 +++++--- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/common_lib/services/profile.py b/common_lib/services/profile.py index 33f44a9..69a8f9c 100644 --- a/common_lib/services/profile.py +++ b/common_lib/services/profile.py @@ -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: diff --git a/pyproject.toml b/pyproject.toml index 34aba8b..0cb52a7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"