karma top

This commit is contained in:
2022-09-14 11:27:44 +03:00
parent 80a1aeb767
commit c15298143f
4 changed files with 20 additions and 6 deletions

View File

@@ -187,3 +187,10 @@ def get_authors_all(_, info, page, size):
end = page * size
start = end - size
return list(UserStorage.get_all_users())[start:end] # type: ignore
@query.field("topAuthors")
def get_top_authors(_, info, page, size):
end = page * size
start = end - size
return list(UserStorage.get_top_users())[start:end] # type: ignore