aboutsummaryrefslogtreecommitdiff
path: root/src/web/views/bookmark.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/views/bookmark.py')
-rw-r--r--src/web/views/bookmark.py10
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():
bgstack15