From 848f71384895ebe197671fac4c0e64644abc330c Mon Sep 17 00:00:00 2001 From: DingZQ Date: Sat, 15 Oct 2022 14:34:57 +0800 Subject: [PATCH] Pass junction id to junction set methods --- main.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.py b/main.py index 5e2fe15..7d8c104 100644 --- a/main.py +++ b/main.py @@ -207,18 +207,21 @@ async def fastapi_get_junction_pattern(network: str, junction: str) -> str: async def fastapi_set_junction_elevation(network: str, junction: str, elevation: float) -> ChangeSet: props = {} props['elevation'] = elevation + props['id'] = junction return set_junction(network, junction, props) @app.post("/setjunctionx/") async def fastapi_set_junction_x(network: str, junction: str, x: float) -> ChangeSet: props = {} props['x'] = x + props['id'] = junction return set_junction(network, junction, props) @app.post("/setjunctionx/") async def fastapi_set_junction_y(network: str, junction: str, y: float) -> ChangeSet: props = {} props['y'] = y + props['id'] = junction return set_junction(network, junction, props) @app.post("/setjunctioncoord/") @@ -226,18 +229,21 @@ async def fastapi_set_junction_coord(network: str, junction: str, x, float, y: f props = {} props['x'] = x props['y'] = y + props['id'] = junction return set_junction(network, junction, props) @app.post("/setjunctiondemand/") async def fastapi_set_junction_demand(network: str, junction: str, demand: float) -> ChangeSet: props = {} props['demand'] = demand + props['id'] = junction return set_junction(network, junction, props) @app.post("/setjunctionpattern/") async def fastapi_set_junction_pattern(network: str, junction: str, pattern: str) -> ChangeSet: props = {} props['pattern'] = pattern + props['id'] = junction return set_junction(network, junction, props) @app.get("/getjunctionproperties/")