add shoutsByUserRatingOrComment

This commit is contained in:
knst-kotov
2022-01-30 14:28:27 +03:00
parent 68f7733f91
commit 073c5252c3
3 changed files with 31 additions and 0 deletions

View File

@@ -104,6 +104,14 @@ class UserStorage:
async with self.lock:
return self.users.get(id)
@staticmethod
async def get_user_by_slug(slug):
self = UserStorage
async with self.lock:
for user in self.users.values():
if user.slug == slug:
return user
@staticmethod
async def add_user(user):
self = UserStorage