From 281b41fc6b8decc90b1b22de5fc2a745cc078a80 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 25 Sep 2023 15:24:23 +0200 Subject: [PATCH] appstore: add route to obtain popularity data info --- store/app.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/store/app.py b/store/app.py index 9640100c..a4e06aee 100644 --- a/store/app.py +++ b/store/app.py @@ -113,6 +113,11 @@ def browse_catalog(): ) +@app.route("/popularity.json") +def popularity_json(): + return {app: len(stars) for app, stars in get_stars().items()} + + @app.route("/app/") def app_info(app_id): infos = get_catalog()["apps"].get(app_id)