page views

This commit is contained in:
bniwredyc
2023-01-18 13:43:56 +01:00
parent e38ab0a066
commit 560bb18bfc
4 changed files with 76 additions and 42 deletions

View File

@@ -176,7 +176,7 @@ async def migrate(entry, storage):
await content_ratings_to_reactions(entry, shout_dict["slug"])
# shout views
await ViewedStorage.increment(shout_dict["slug"], amount=entry.get("views", 1))
await ViewedStorage.increment(shout_dict["slug"], amount=entry.get("views", 1), viewer='old-discours')
# del shout_dict['ratings']
storage["shouts"]["by_oid"][entry["_id"]] = shout_dict