Refine
This commit is contained in:
6
main.py
6
main.py
@@ -1392,11 +1392,11 @@ async def fastapi_get_node_coord(network: str, node: str) -> dict[str, float] |
|
|||||||
return get_node_coord(network, node)
|
return get_node_coord(network, node)
|
||||||
|
|
||||||
@app.get("/getnetworkcoords/")
|
@app.get("/getnetworkcoords/")
|
||||||
async def fastapi_get_network_coords(network: str) -> dict[str, str] | None:
|
async def fastapi_get_network_coords(network: str) -> list[str] | None:
|
||||||
coords = get_network_coords(network)
|
coords = get_network_coords(network)
|
||||||
result = {}
|
result = []
|
||||||
for node_id, coord in coords.items():
|
for node_id, coord in coords.items():
|
||||||
result[node_id] = f"{coord['x']}:{coord['y']}"
|
result.append(f"{node_id}:{coord['x']}:{coord['y']}")
|
||||||
return result
|
return result
|
||||||
|
|
||||||
############################################################
|
############################################################
|
||||||
|
|||||||
Reference in New Issue
Block a user