aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/views/feed.py
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel+bitbucket@gmail.com>2015-07-06 23:22:59 +0200
committerCédric Bonhomme <kimble.mandel+bitbucket@gmail.com>2015-07-06 23:22:59 +0200
commit2676d9881593f03142bd790ae5603c07e99c1adf (patch)
tree8f12fe10f1c79b6e036c09f44902f83f76940e6f /pyaggr3g470r/views/feed.py
parentMinor fixes from a quick review. Need to test deeper. (diff)
parentmaking it possible for super admin to update other's feed (diff)
downloadnewspipe-2676d9881593f03142bd790ae5603c07e99c1adf.tar.gz
newspipe-2676d9881593f03142bd790ae5603c07e99c1adf.tar.bz2
newspipe-2676d9881593f03142bd790ae5603c07e99c1adf.zip
Merged in jaesivsm/pyaggr3g470r (pull request #17)
sorry, another pull request in a very short delay
Diffstat (limited to 'pyaggr3g470r/views/feed.py')
-rw-r--r--pyaggr3g470r/views/feed.py3
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:
bgstack15