delete token from internal
This commit is contained in:
parent
c2405f1326
commit
d25d1bb8b3
@ -27,12 +27,11 @@ 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, token: str) -> dict:
|
||||
async def get_profile_by_user_id(user_id: UUID, current_user: UUID) -> dict:
|
||||
try:
|
||||
# async with httpx.AsyncClient(transport=ssl_transport, timeout=5.0) as client:
|
||||
response = await client.post(
|
||||
f"{settings.PROFILE_SERVICE}/user_id/internal",
|
||||
headers={"Authorization": f"Bearer {token}"},
|
||||
json={"user_id": str(user_id),
|
||||
"current_user": str(current_user)})
|
||||
|
||||
@ -49,12 +48,11 @@ async def get_profile_by_user_id(user_id: UUID, current_user: UUID, token: str)
|
||||
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_id: UUID) -> Dict[str, dict]:
|
||||
async def get_profiles_by_user_ids(user_ids: List[UUID], user_id: UUID) -> Dict[str, dict]:
|
||||
try:
|
||||
# async with httpx.AsyncClient(transport=ssl_transport, timeout=5.0) as client:
|
||||
response = await client.post(
|
||||
f"{settings.PROFILE_SERVICE}/user_ids/internal",
|
||||
headers={"Authorization": f"Bearer {token}"},
|
||||
json={"user_ids": [str(uid) for uid in user_ids],
|
||||
"user_id": str(user_id)})
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "common-lib"
|
||||
version = "0.0.27"
|
||||
version = "0.0.28"
|
||||
description = "Библиотека общих компонентов для микросервисов yobble"
|
||||
authors = [{ name = "cheykrym", email = "you@example.com" }]
|
||||
license = "MIT"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user