From 8057af2b8eb5dda67f9b06b293d062da9b52c86c Mon Sep 17 00:00:00 2001 From: Untone Date: Fri, 13 Oct 2023 12:57:18 +0300 Subject: [PATCH] core-debug --- services/core.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/services/core.py b/services/core.py index fddf587..926c0a1 100644 --- a/services/core.py +++ b/services/core.py @@ -11,14 +11,15 @@ async def get_author(author_id): gql = { "query": "query GetAuthor { getAuthor(author_id: Int!) { id slug userpic name lastSeen } }", "operation": "GetAuthor", - "variables": { "author_id" : author_id } + "variables": {"author_id": author_id} } try: async with AsyncClient() as client: response = await client.post(API_BASE, headers=headers, data=gql) if response.status_code != 200: - return False, None + return None r = response.json() + print(f"[services.core] got author: {author}") author = r.get("data", {}).get("getAuthor") return author except Exception: