From 30b48eb41a9515feaf7dbc5cd4eb8847371b237c Mon Sep 17 00:00:00 2001 From: François Schmidts Date: Mon, 6 Jul 2015 21:21:52 +0200 Subject: adding feed icons on feed pages --- pyaggr3g470r/views/feed.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pyaggr3g470r/views/feed.py') diff --git a/pyaggr3g470r/views/feed.py b/pyaggr3g470r/views/feed.py index 3556d7c7..18e110af 100644 --- a/pyaggr3g470r/views/feed.py +++ b/pyaggr3g470r/views/feed.py @@ -189,7 +189,8 @@ def process_form(feed_id=None): @feed_bp.route('/icon/', methods=['GET']) @login_required def icon(feed_id): - icon = FeedController(g.user.id).get(id=feed_id).icon + icon = FeedController(None if g.user.is_admin() else g.user.id)\ + .get(id=feed_id).icon etag = md5(icon.encode('utf8')).hexdigest() headers = {'Cache-Control': 'max-age=86400', 'ETag': etag} if request.headers.get('if-none-match') == etag: -- cgit