Fix jwt-token
This commit is contained in:
@@ -100,8 +100,14 @@ def debug_device_status():
|
||||
print(f" Active: {stockholm_device.get('is_active', False)}")
|
||||
print(f" Approved: {stockholm_device.get('is_approved', False)}")
|
||||
print(f" Coordinates: {stockholm_device.get('geo_lat', 'N/A')}, {stockholm_device.get('geo_lon', 'N/A')}")
|
||||
print(f" Location: {stockholm_device.get('location_description', 'N/A')}")
|
||||
print(f" Last Heartbeat: {stockholm_device.get('last_heartbeat', 'Never')}")
|
||||
print(f" Heartbeat Interval: {stockholm_device.get('heartbeat_interval', 'Not set')} seconds")
|
||||
print(f" Firmware Version: {stockholm_device.get('firmware_version', 'N/A')}")
|
||||
print(f" Installation Date: {stockholm_device.get('installation_date', 'N/A')}")
|
||||
print(f" Notes: {stockholm_device.get('notes', 'N/A')}")
|
||||
print(f" Created: {stockholm_device.get('created_at', 'N/A')}")
|
||||
print(f" Updated: {stockholm_device.get('updated_at', 'N/A')}")
|
||||
|
||||
# Calculate status manually
|
||||
if stockholm_device.get('last_heartbeat'):
|
||||
@@ -133,7 +139,9 @@ def debug_device_status():
|
||||
print("Available devices:")
|
||||
for device in devices:
|
||||
coords = f"({device.get('geo_lat', 'N/A')}, {device.get('geo_lon', 'N/A')})"
|
||||
print(f" - ID {device['id']}: {device.get('name', 'Unnamed')} at {coords}")
|
||||
status = "✅ Active" if device.get('is_active') else "❌ Inactive"
|
||||
approved = "✅ Approved" if device.get('is_approved') else "⚠️ Pending"
|
||||
print(f" - ID {device['id']}: {device.get('name', 'Unnamed')} at {coords} | {status} | {approved}")
|
||||
else:
|
||||
print(f"❌ No devices found")
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user