New [scrub] button when editing a watch - scrub single watch history (#672)

This commit is contained in:
dgtlmoon
2022-06-08 18:32:25 +02:00
committed by GitHub
parent 1ab70f8e86
commit cdcf4b353f
3 changed files with 29 additions and 3 deletions

View File

@@ -458,6 +458,19 @@ def changedetection_app(config=None, datastore_o=None):
return 'OK'
@app.route("/scrub/<string:uuid>", methods=['GET'])
@login_required
def scrub_watch(uuid):
try:
datastore.scrub_watch(uuid)
except KeyError:
flash('Watch not found', 'error')
else:
flash("Scrubbed watch {}".format(uuid))
return redirect(url_for('index'))
@app.route("/scrub", methods=['GET', 'POST'])
@login_required
def scrub_page():