Get node coord

This commit is contained in:
DingZQ
2022-08-21 22:30:55 +08:00
parent 482e7729b7
commit b707664ffc

View File

@@ -76,6 +76,15 @@ async def fastapi_count_node(network: str):
print(count)
return count.value
@app.get("/getnodecoord/")
async def fastapi_get_node_coord(network: str, node: str):
pt = []
value = get_node_coord(network, node).value
pt.append(value.x)
pt.append(value.y)
return pt
@app.post("/setnodecoord/")
async def fastapi_set_node_coord(network: str, node: str, x: int, y: int):
set_node_coord(network, node, x, y)