Skip to content

Commit

Permalink
tweak API reference
Browse files Browse the repository at this point in the history
  • Loading branch information
dgtlmoon committed Dec 29, 2024
1 parent 78e875b commit 061693b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions changedetectionio/api/api_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def get(self, uuid):
"""
from copy import deepcopy
watch = deepcopy(self.datastore.data['watching'].get(uuid))

if not watch:
abort(404, message='No watch exists with the UUID of {}'.format(uuid))

Expand All @@ -75,10 +76,11 @@ def get(self, uuid):

# Return without history, get that via another API call
# Properties are not returned as a JSON, so add the required props manually
watch['history_n'] = watch.history_n
watch['last_changed'] = watch.last_changed
watch['viewed'] = watch.viewed
return watch
result = watch.as_dict()
result['history_n'] = watch.history_n
result['last_changed'] = watch.last_changed
result['viewed'] = watch.viewed
return result

@auth.check_token
def delete(self, uuid):
Expand Down

0 comments on commit 061693b

Please sign in to comment.