Refine add and delete junction

This commit is contained in:
DingZQ
2022-10-15 09:19:11 +08:00
parent 4a6cdb9d07
commit 7bf1493a41

View File

@@ -164,13 +164,13 @@ async def fast_get_junction_schema(network: str) -> dict[str, dict[str, Any]]:
@app.post("/addjunction/")
async def fastapi_add_junction(network: str, junction: str, x: float, y: float, z: float) -> ChangeSet:
cs = {'id' : network, 'x' : x, 'y' : y, 'elevation' : z}
return add_junction(network, cs)
ps = {'id' : network, 'x' : x, 'y' : y, 'elevation' : z}
return add_junction(network, ChangeSet(ps))
@app.post("/deletejunction/")
async def fastapi_delete_junction(network: str, junction: str) -> ChangeSet:
cs = {'id' : junction}
return delete_junction(network, cs)
ps = {'id' : junction}
return delete_junction(network, ChangeSet(ps))
@app.get("/getjunctionelevation/")
async def fastapi_get_junction_elevation(network: str, junction: str) -> float: