From deb17a061bab5c79ffda4744d452bdcb6067900a Mon Sep 17 00:00:00 2001 From: Craig Oates Date: Fri, 8 Jan 2021 20:02:24 +0000 Subject: [PATCH] correct URL used for RESTAPI calls. The URL before was for adding a light reading -- not getting a reading. This URL change fixes that. This is what happens when you copy-and-paste code from the Light Meter project into this one. --- relay.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/relay.py b/relay.py index 515dbdf..344245e 100644 --- a/relay.py +++ b/relay.py @@ -15,9 +15,9 @@ device_id = platform.node() # For servers logs. def get_api_url(): # Yes, I know I could do this better. Stop moaning. if (device_id == "gallery1"): - return "http://ritherdon.abbether.net/api/readings/add/1" + return "http://ritherdon.abbether.net/api/readings/latest/1" elif (device_id == "gallery2"): - return "http://ritherdon.abbether.net/api/readings/add/2" + return "http://ritherdon.abbether.net/api/readings/latest/2" # Make sure this is valid. # api_url = "http://ritherdon.abbether.net/api/readings/add/1"