mirror of
https://github.com/pablorevilla-meshtastic/meshview.git
synced 2026-03-04 23:27:46 +01:00
Fix for api/edges traceback
This commit is contained in:
@@ -1691,6 +1691,14 @@ async def api_edges(request):
|
||||
f"Error decoding NeighborInfo packet {getattr(packet, 'id', '?')}: {e}"
|
||||
)
|
||||
|
||||
# Convert edges dict to list format for JSON response
|
||||
edges_list = [
|
||||
{"from": frm, "to": to, "type": edge_type}
|
||||
for (frm, to), edge_type in edges.items()
|
||||
]
|
||||
|
||||
return web.json_response({"edges": edges_list})
|
||||
|
||||
|
||||
@routes.get("/api/lang")
|
||||
async def api_lang(request):
|
||||
|
||||
Reference in New Issue
Block a user