diff --git a/services/auth.py b/services/auth.py index 152f1f5..fd547f7 100644 --- a/services/auth.py +++ b/services/auth.py @@ -3,7 +3,7 @@ from aiohttp import ClientSession from starlette.exceptions import HTTPException from models.member import ChatMember -from services.core import get_author +from services.core import authors_by_user from settings import AUTH_URL @@ -63,7 +63,7 @@ def login_required(f): user_id = await check_auth(req) if user_id: context["user_id"] = user_id - author: ChatMember | None = await get_author(user_id) + author: ChatMember | None = authors_by_user.get(user_id) if author: context["author_id"] = author["id"] return await f(*args, **kwargs) diff --git a/services/core.py b/services/core.py index 9a80d7c..2379e05 100644 --- a/services/core.py +++ b/services/core.py @@ -52,7 +52,3 @@ async def get_my_followed() -> List[ChatMember]: } return await _request_endpoint(query_name, gql) or [] - - -async def get_author(user: str = ""): - return authors_by_user.get(user)