From c1eb4839fb7d8b4d2ffca8485704470c7498f99d Mon Sep 17 00:00:00 2001 From: John Madden Date: Sat, 24 Feb 2024 15:47:07 -0800 Subject: [PATCH] Update TTN json path --- backend/api/resources/sensor_data_ttn.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/api/resources/sensor_data_ttn.py b/backend/api/resources/sensor_data_ttn.py index 794ca8df..872e9fba 100644 --- a/backend/api/resources/sensor_data_ttn.py +++ b/backend/api/resources/sensor_data_ttn.py @@ -30,6 +30,8 @@ def post(self): Response indicating success or failure. See util.process_measurement for full description. """ + + import pdb; pdb.set_trace() content_type = request.headers.get("Content-Type") @@ -40,7 +42,7 @@ def post(self): raise ValueError("POST request must be application/json") # get payload - payload_str = uplink_json["data"]["uplink_message"]["frm_payload"] + payload_str = uplink_json["uplink_message"]["frm_payload"] payload = base64.b64decode(payload_str) resp = process_measurement(payload)