some-fixes-chats

This commit is contained in:
2022-11-23 12:57:58 +03:00
parent 5ecb0d811b
commit 2cb152bdb1
7 changed files with 36 additions and 16 deletions

View File

@@ -35,8 +35,10 @@ class ReactedStorage:
@staticmethod
async def get_shout_stat(slug):
viewed = await ViewedStorage.get_shout(slug)
print(viewed)
return {
"viewed": await ViewedStorage.get_shout(slug),
"viewed": viewed,
"reacted": len(await ReactedStorage.get_shout(slug)),
"commented": len(await ReactedStorage.get_comments(slug)),
"rating": await ReactedStorage.get_rating(slug),