Refine
This commit is contained in:
10
main.py
10
main.py
@@ -1391,9 +1391,13 @@ async def fastapi_set_option_properties(network: str, req: Request) -> ChangeSet
|
||||
async def fastapi_get_node_coord(network: str, node: str) -> dict[str, float] | None:
|
||||
return get_node_coord(network, node)
|
||||
|
||||
@app.get("/getnetworkcoords/", response_class = PlainTextResponse)
|
||||
async def fastapi_get_network_coords(network: str) -> dict[str, dict[str, float]] | None:
|
||||
return json.dumps(get_network_coords(network))
|
||||
@app.get("/getnetworkcoords/")
|
||||
async def fastapi_get_network_coords(network: str) -> dict[str, str] | None:
|
||||
coords = get_network_coords(network)
|
||||
result = {}
|
||||
for node_id, coord in coords.items():
|
||||
result[node_id] = f"{coord['x']}:{coord['y']}"
|
||||
return result
|
||||
|
||||
############################################################
|
||||
# vertex 25.[VERTICES]
|
||||
|
||||
Reference in New Issue
Block a user