aboutsummaryrefslogtreecommitdiff
path: root/src/web/views
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2016-01-29 14:26:02 +0100
committerFrançois Schmidts <francois.schmidts@gmail.com>2016-01-29 14:26:02 +0100
commit4098a0de815013c521618b6419d91f997c986ef0 (patch)
treed8df5e60904924c65dccfd51333b67597b0b30fa /src/web/views
parentcorrecting awful middle panel action handling (diff)
downloadnewspipe-4098a0de815013c521618b6419d91f997c986ef0.tar.gz
newspipe-4098a0de815013c521618b6419d91f997c986ef0.tar.bz2
newspipe-4098a0de815013c521618b6419d91f997c986ef0.zip
draft displaying article
Diffstat (limited to 'src/web/views')
-rw-r--r--src/web/views/views.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/web/views/views.py b/src/web/views/views.py
index 84d1eacb..3e7bf80a 100644
--- a/src/web/views/views.py
+++ b/src/web/views/views.py
@@ -306,6 +306,17 @@ def get_middle_panel():
return _articles_to_json(articles, fd_hash)
+@app.route('/getart/<int:article_id>')
+@login_required
+def get_article(article_id):
+ article = ArticleController(g.user.id).get(id=article_id).dump()
+ article['category_id'] = article['category_id'] or 0
+ feed = FeedController(g.user.id).get(id=article['feed_id'])
+ article['icon_url'] = url_for('icon.icon', url=feed.icon_url) \
+ if feed.icon_url else None
+ return jsonify(**article)
+
+
@app.route('/mark_all_as_read', methods=['PUT'])
@login_required
def mark_all_as_read():
bgstack15