Fix jwt-token

This commit is contained in:
2025-09-07 14:29:24 +02:00
parent ab44f83464
commit a09abf5cbb

View File

@@ -200,6 +200,7 @@ class SwedishDroneSimulator:
"""Send drone detection to the API"""
try:
payload = {
"type": "detection", # Add type field for detection
"device_id": detection.device_id,
"geo_lat": detection.geo_lat,
"geo_lon": detection.geo_lon,
@@ -211,7 +212,7 @@ class SwedishDroneSimulator:
}
response = requests.post(
f"{self.api_base_url}/detections",
f"{self.api_base_url}/detectors",
json=payload,
headers={"Content-Type": "application/json"},
timeout=10
@@ -257,7 +258,7 @@ class SwedishDroneSimulator:
}
response = requests.post(
f"{self.api_base_url}/heartbeat",
f"{self.api_base_url}/detectors",
json=payload,
headers={"Content-Type": "application/json"},
timeout=10