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

@@ -32,6 +32,14 @@ class UserStorage:
aaa.sort(key=lambda user: user.createdAt)
return aaa
@staticmethod
async def get_top_users():
self = UserStorage
async with self.lock:
aaa = list(self.users.values())
aaa.sort(key=lambda user: user.rating)
return aaa
@staticmethod
async def get_user_by_slug(slug):
self = UserStorage