debug-response
All checks were successful
deploy / deploy (push) Successful in 1m36s

This commit is contained in:
Untone 2023-12-13 20:13:57 +03:00
parent 29c02158b7
commit a86739ed1b
2 changed files with 3 additions and 1 deletions

View File

@ -165,10 +165,11 @@ async def load_authors_all(_, _info, limit: int = 50, offset: int = 0):
async def get_author(_, _info, slug="", user=None, author_id=None): async def get_author(_, _info, slug="", user=None, author_id=None):
q = None q = None
if slug or user or author_id: if slug or user or author_id:
if slug: if slug != "":
q = select(Author).where(Author.slug == slug) q = select(Author).where(Author.slug == slug)
elif user: elif user:
q = select(Author).where(Author.user == user) q = select(Author).where(Author.user == user)
print(f"[resolvers.author] SQL: {q}")
elif author_id: elif author_id:
q = select(Author).where(Author.id == author_id) q = select(Author).where(Author.id == author_id)
q = add_author_stat_columns(q) q = add_author_stat_columns(q)

View File

@ -16,6 +16,7 @@ async def check_auth(req):
async with aiohttp.ClientSession(timeout=aiohttp.ClientTimeout(total=30.0)) as session: async with aiohttp.ClientSession(timeout=aiohttp.ClientTimeout(total=30.0)) as session:
async with session.post(AUTH_URL, json=gql) as response: async with session.post(AUTH_URL, json=gql) as response:
print(response)
if response.status != 200: if response.status != 200:
return False, None return False, None
r = await response.json() r = await response.json()