diff options
author | François Schmidts <francois.schmidts@gmail.com> | 2015-07-06 21:21:52 +0200 |
---|---|---|
committer | François Schmidts <francois.schmidts@gmail.com> | 2015-07-06 21:44:51 +0200 |
commit | 30b48eb41a9515feaf7dbc5cd4eb8847371b237c (patch) | |
tree | ab33ed59f2d09cd5aa5f30f28e190ecec9a7cbad /pyaggr3g470r/views | |
parent | Minor fixes from a quick review. Need to test deeper. (diff) | |
download | newspipe-30b48eb41a9515feaf7dbc5cd4eb8847371b237c.tar.gz newspipe-30b48eb41a9515feaf7dbc5cd4eb8847371b237c.tar.bz2 newspipe-30b48eb41a9515feaf7dbc5cd4eb8847371b237c.zip |
adding feed icons on feed pages
Diffstat (limited to 'pyaggr3g470r/views')
-rw-r--r-- | pyaggr3g470r/views/feed.py | 3 |
1 files changed, 2 insertions, 1 deletions
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/<int:feed_id>', 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: |