stat-docs-reactions-apifix
Some checks failed
Deploy on push / deploy (push) Failing after 9s

This commit is contained in:
2024-08-07 14:02:36 +03:00
parent 6517fc9550
commit a01ca30f5b
2 changed files with 117 additions and 27 deletions

View File

@@ -418,17 +418,14 @@ async def load_reactions_by(_, info, by, limit=50, offset=0):
reaction,
author,
shout,
reacted_stat,
commented_stat,
likes_stat,
dislikes_stat,
rating_stat,
last_reacted_at,
] in result_rows:
reaction.created_by = author
reaction.shout = shout
reaction.stat = {
"rating": int(likes_stat or 0) - int(dislikes_stat or 0),
"reacted": reacted_stat,
"rating": rating_stat,
"commented": commented_stat,
"last_reacted_at": last_reacted_at,
}