Skip to content

Commit

Permalink
Add images to feeds
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenwardy committed Jul 2, 2024
1 parent 19fa1d9 commit 31d5eb7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/blueprints/feeds/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def _get_new_packages_feed(feed_url: str) -> dict:
"avatar": package.author.get_profile_pic_url(absolute=True),
"url": abs_url_for("users.profile", username=package.author.username),
},
"image": package.get_thumb_url(level=4, abs=True, format="png"),
"url": package.get_url("packages.view", absolute=True),
"summary": package.short_desc,
"date_published": package.approved_at.isoformat(timespec="seconds") + "Z",
Expand Down Expand Up @@ -88,6 +89,7 @@ def _get_releases_feed(query, feed_url: str):
"url": abs_url_for("users.profile", username=release.package.author.username),
},
"url": release.package.get_url("packages.view_release", id=release.id, absolute=True),
"image": release.package.get_thumb_url(level=4, abs=True, format="png"),
"summary": release.summary,
"date_published": release.created_at.isoformat(timespec="seconds") + "Z",
"tags": ["release"],
Expand Down

0 comments on commit 31d5eb7

Please sign in to comment.