From abf234298c86917beb9f2923c0ebe265366fac90 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Sat, 25 Feb 2023 22:00:46 +0100 Subject: [PATCH] API - Including `last_changed` timestamp in watch API info (#1436) --- changedetectionio/api/api_v1.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/changedetectionio/api/api_v1.py b/changedetectionio/api/api_v1.py index ee71b7d1..e28972d6 100644 --- a/changedetectionio/api/api_v1.py +++ b/changedetectionio/api/api_v1.py @@ -70,7 +70,10 @@ class Watch(Resource): return "OK", 200 # 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 + return watch @auth.check_token