morning-fixes

This commit is contained in:
2022-11-26 03:55:45 +03:00
parent 839485873a
commit 228cdf21e9
5 changed files with 74 additions and 80 deletions

View File

@@ -6,7 +6,6 @@ from base.resolvers import mutation, query
from orm import Shout
from orm.topic import Topic, TopicFollower
from services.zine.topics import TopicStorage
# from services.stat.reacted import ReactedStorage
from services.stat.topicstat import TopicStat
@@ -17,11 +16,7 @@ async def get_topic_stat(slug):
return {
"shouts": len(TopicStat.shouts_by_topic.get(slug, {}).keys()),
"authors": len(TopicStat.authors_by_topic.get(slug, {}).keys()),
"followers": len(TopicStat.followers_by_topic.get(slug, {}).keys()),
# "viewed": await ViewedStorage.get_topic(slug),
# "reacted": len(await ReactedStorage.get_topic(slug)),
# "commented": len(await ReactedStorage.get_topic_comments(slug)),
# "rating": await ReactedStorage.get_topic_rating(slug)
"followers": len(TopicStat.followers_by_topic.get(slug, {}).keys())
}