aboutsummaryrefslogtreecommitdiff
path: root/src/web/views
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2016-01-31 16:07:04 +0100
committerFrançois Schmidts <francois.schmidts@gmail.com>2016-01-31 16:07:04 +0100
commit6a4e5c8626476a3e24e4170b7b1c541ddcc9bbee (patch)
tree2a1123ad2013c6ecb2cd4a932a1443771dffd34d /src/web/views
parentdecommissionning old home (diff)
downloadnewspipe-6a4e5c8626476a3e24e4170b7b1c541ddcc9bbee.tar.gz
newspipe-6a4e5c8626476a3e24e4170b7b1c541ddcc9bbee.tar.bz2
newspipe-6a4e5c8626476a3e24e4170b7b1c541ddcc9bbee.zip
right redirect link handling
Diffstat (limited to 'src/web/views')
-rw-r--r--src/web/views/article.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/web/views/article.py b/src/web/views/article.py
index 664b66c8..5b04fe7a 100644
--- a/src/web/views/article.py
+++ b/src/web/views/article.py
@@ -17,7 +17,10 @@ article_bp = Blueprint('article', __name__, url_prefix='/article')
@article_bp.route('/redirect/<int:article_id>', methods=['GET'])
@login_required
def redirect_to_article(article_id):
- article = ArticleController(g.user.id).get(id=article_id)
+ contr = ArticleController(g.user.id)
+ article = contr.get(id=article_id)
+ if not article.readed:
+ contr.update({'id': article.id}, {'readed': True})
return redirect(article.link)
bgstack15