diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-03-01 17:34:24 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-03-01 17:34:24 +0100 |
commit | 9b1d18dcf1ea123ec84cb7200e04a41658b9a4b6 (patch) | |
tree | e33aea5c10ca3e48242acb08cc8baa0c8e306553 | |
parent | improved display on mobile devices (diff) | |
download | newspipe-9b1d18dcf1ea123ec84cb7200e04a41658b9a4b6.tar.gz newspipe-9b1d18dcf1ea123ec84cb7200e04a41658b9a4b6.tar.bz2 newspipe-9b1d18dcf1ea123ec84cb7200e04a41658b9a4b6.zip |
fixed issue with the function to mar all articles of a feed as read.
-rw-r--r-- | newspipe/web/views/article.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/newspipe/web/views/article.py b/newspipe/web/views/article.py index e3a00466..5fdaec3e 100644 --- a/newspipe/web/views/article.py +++ b/newspipe/web/views/article.py @@ -104,12 +104,12 @@ def history(year=None, month=None): @article_bp.route("/mark_as/<string:new_value>", methods=["GET"]) @article_bp.route( - "/mark_as/<string:new_value>/feed/<int:article_id>", methods=["GET"] + "/mark_as/<string:new_value>/feed/<int:feed_id>", methods=["GET"] ) @login_required def mark_as(new_value="read", feed_id=None, article_id=None): """ - Mark all unreaded articles as read. + Mark a single article or all articles of a feed as read/unread. """ readed = new_value == "read" art_contr = ArticleController(current_user.id) @@ -125,9 +125,9 @@ def mark_as(new_value="read", feed_id=None, article_id=None): art_contr.update(filters, {"readed": readed}) flash(gettext(message % new_value), "info") - if readed: - return redirect(redirect_url()) - return redirect("home") + # if readed: + # return redirect(redirect_url()) + return redirect(url_for("home")) @articles_bp.route("/expire_articles", methods=["GET"]) |