Add getjuncitoncorrd

This commit is contained in:
DingZQ
2022-09-14 22:47:46 +08:00
parent 63f8aa3ac7
commit 5e5072d365

View File

@@ -87,6 +87,10 @@ async def fastapi_get_nodes(network: str):
async def fastapi_add_junction(network: str, junction: str, x: float, y: float, z: float) -> ChangeSet:
return add_junction(network, junction, x, y, z)
@app.get("/getjunctioncoord/")
async def fastapi_get_junction_coord(network: str, junction: str) : dict[str, float]:
return get_junction_coord(network, junction)
@app.post("/addnode/")
async def fastapi_add_node(network: str, node: str):
idx = add_node(network, node, JUNCTION)