Get node coord
This commit is contained in:
9
main.py
9
main.py
@@ -76,6 +76,15 @@ async def fastapi_count_node(network: str):
|
|||||||
print(count)
|
print(count)
|
||||||
return count.value
|
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/")
|
@app.post("/setnodecoord/")
|
||||||
async def fastapi_set_node_coord(network: str, node: str, x: int, y: int):
|
async def fastapi_set_node_coord(network: str, node: str, x: int, y: int):
|
||||||
set_node_coord(network, node, x, y)
|
set_node_coord(network, node, x, y)
|
||||||
|
|||||||
Reference in New Issue
Block a user