diff --git a/main.py b/main.py index 941a49f..3ec53f9 100644 --- a/main.py +++ b/main.py @@ -262,11 +262,11 @@ async def fastapi_get_junction_properties(network: str, junction: str) -> dict[s return get_junction(network, junction) @app.post("/setjunctionproperties/") -async def fastapi_set_junction_properties(network: str, junction: str, props: dict[str, Any]) -> ChangeSet: +async def fastapi_set_junction_properties(network: str, junction: str, req: Request) -> ChangeSet: + props = await req.json() ps = { 'id' : junction } | props return set_junction(network, ChangeSet(ps)) - ############################################################ # reservoir 3.[RESERVOIRS] ############################################################