diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2017-05-26 09:31:39 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2017-05-26 09:31:39 +0200 |
commit | aea01678fe2f5c22c62d7c1f8234d91aa38fe7b4 (patch) | |
tree | 60753f06e5047c3af1fd320808d16b985f58b46f /src/web/views/bookmark.py | |
parent | Updated translations. (diff) | |
download | newspipe-aea01678fe2f5c22c62d7c1f8234d91aa38fe7b4.tar.gz newspipe-aea01678fe2f5c22c62d7c1f8234d91aa38fe7b4.tar.bz2 newspipe-aea01678fe2f5c22c62d7c1f8234d91aa38fe7b4.zip |
Delete all bookmarks.
Diffstat (limited to 'src/web/views/bookmark.py')
-rw-r--r-- | src/web/views/bookmark.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/web/views/bookmark.py b/src/web/views/bookmark.py index cc43f191..93da0023 100644 --- a/src/web/views/bookmark.py +++ b/src/web/views/bookmark.py @@ -146,6 +146,16 @@ def delete(bookmark_id=None): return redirect(redirect_url()) +@bookmarks_bp.route('/delete', methods=['GET']) +@login_required +def delete_all(): + "Delete all bookmarks." + bookmark = BookmarkController(current_user.id).read().delete() + db.session.commit() + flash(gettext("Bookmarks successfully deleted."), 'success') + return redirect(redirect_url()) + + @bookmark_bp.route('/bookmarklet', methods=['GET', 'POST']) @login_required def bookmarklet(): |