fix0async
This commit is contained in:
parent
25bf26e61d
commit
427e700a30
|
@ -184,12 +184,13 @@ def author_unfollow(user, slug):
|
||||||
|
|
||||||
|
|
||||||
@query.field("authorsAll")
|
@query.field("authorsAll")
|
||||||
def get_authors_all(_, _info):
|
async def get_authors_all(_, _info):
|
||||||
authors = await UserStorage.get_all_users()
|
authors = await UserStorage.get_all_users()
|
||||||
for author in authors:
|
for author in authors:
|
||||||
author.stat = await get_author_stat(author.slug)
|
author.stat = await get_author_stat(author.slug)
|
||||||
return authors
|
return authors
|
||||||
|
|
||||||
|
|
||||||
@query.field("topAuthors")
|
@query.field("topAuthors")
|
||||||
def get_top_authors(_, _info, offset, limit):
|
def get_top_authors(_, _info, offset, limit):
|
||||||
return list(UserStorage.get_top_users())[offset : offset + limit] # type: ignore
|
return list(UserStorage.get_top_users())[offset : offset + limit] # type: ignore
|
||||||
|
|
Loading…
Reference in New Issue
Block a user