Merge pull request #31 from Discours/get-author-get-topic-fix

getTopic, getAuthor fix
This commit is contained in:
Tony 2022-11-11 21:07:38 +03:00 committed by GitHub
commit c9d607035a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

8
CHECKS
View File

@ -1,5 +1,5 @@
WAIT=30
TIMEOUT=10
ATTEMPTS=60 # 60 * 30 = 30 min
# WAIT=30
# TIMEOUT=10
# ATTEMPTS=60 # 60 * 30 = 30 min
/ Playground
# / Playground

View File

@ -213,6 +213,6 @@ def get_top_authors(_, _info, offset, limit):
@query.field("getAuthor")
async def get_author(_, _info, slug):
a = await UserStorage.users[slug]
a.stat = get_author_stat(slug)
a = await UserStorage.get_user_by_slug(slug)
a.stat = await get_author_stat(slug)
return a

View File

@ -55,8 +55,8 @@ async def topics_by_author(_, _info, author):
@query.field("getTopic")
async def get_topic(_, _info, slug):
t = await TopicStorage.topics[slug]
t.stat = get_topic_stat(slug)
t = TopicStorage.topics[slug]
t.stat = await get_topic_stat(slug)
return t