From 0222a49cc3b39fc309efc47f6e7e2d2b4aa93b86 Mon Sep 17 00:00:00 2001 From: DingZQ Date: Wed, 19 Oct 2022 19:13:46 +0800 Subject: [PATCH] Refine setjuncitonproperties --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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] ############################################################