Fix jwt-token
This commit is contained in:
@@ -63,13 +63,16 @@ class DeviceProbeSimulator:
|
||||
return False
|
||||
|
||||
try:
|
||||
# ONLY send the exact format requested: {type:"heartbeat", key:"device_id"}
|
||||
payload = {
|
||||
'type': 'heartbeat',
|
||||
'key': device['unique_key'] # Use the device's unique key
|
||||
'key': str(device_id) # Use device_id as the key
|
||||
}
|
||||
|
||||
print(f"📡 Sending heartbeat: {payload}")
|
||||
|
||||
response = self.session.post(
|
||||
f"{self.api_base_url}/devices/heartbeat",
|
||||
f"{self.api_base_url}/heartbeat", # Changed to correct endpoint
|
||||
json=payload,
|
||||
timeout=10
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user