API - Improvements, support PUT for updating existing watch, set muted state, set paused state, see https://changedetection.io/docs/api_v1/index.html (#1213)

This commit is contained in:
dgtlmoon
2023-01-10 19:00:57 +01:00
committed by GitHub
parent fab7d325f7
commit 024c8d8fd5
28 changed files with 2479 additions and 87 deletions

View File

@@ -379,9 +379,9 @@ def changedetection_app(config=None, datastore_o=None):
if op:
uuid = request.args.get('uuid')
if op == 'pause':
datastore.data['watching'][uuid]['paused'] ^= True
datastore.data['watching'][uuid].toggle_pause()
elif op == 'mute':
datastore.data['watching'][uuid]['notification_muted'] ^= True
datastore.data['watching'][uuid].toggle_mute()
datastore.needs_write = True
return redirect(url_for('index', tag = limit_tag))