1
0
Fork 0
Browse Source

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.
unstable
Craig Oates 3 years ago
parent
commit
deb17a061b
  1. 4
      relay.py

4
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"