diff options
author | François Schmidts <francois.schmidts@gmail.com> | 2016-01-29 14:26:02 +0100 |
---|---|---|
committer | François Schmidts <francois.schmidts@gmail.com> | 2016-01-29 14:26:02 +0100 |
commit | 4098a0de815013c521618b6419d91f997c986ef0 (patch) | |
tree | d8df5e60904924c65dccfd51333b67597b0b30fa /src/web/views/views.py | |
parent | correcting awful middle panel action handling (diff) | |
download | newspipe-4098a0de815013c521618b6419d91f997c986ef0.tar.gz newspipe-4098a0de815013c521618b6419d91f997c986ef0.tar.bz2 newspipe-4098a0de815013c521618b6419d91f997c986ef0.zip |
draft displaying article
Diffstat (limited to 'src/web/views/views.py')
-rw-r--r-- | src/web/views/views.py | 11 |
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(): |