Add featured field to packages API

Fixes #500
This commit is contained in:
rubenwardy 2024-04-05 18:25:41 +01:00
parent 609354cd35
commit 465370d3fc

@ -93,6 +93,7 @@ def packages():
for pkg in featured:
featured_lut.add(f"{pkg['author']}/{pkg['name']}")
pkg["short_description"] = gettext("Featured") + ". " + pkg["short_description"]
pkg["featured"] = True
not_featured = [pkg for pkg in pkgs if f"{pkg['author']}/{pkg['name']}" not in featured_lut]
pkgs = featured + not_featured