Refine add and delete junction
This commit is contained in:
8
main.py
8
main.py
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user