Refine setjuncitonproperties

This commit is contained in:
DingZQ
2022-10-19 19:13:46 +08:00
parent b867c88bf2
commit 0222a49cc3

View File

@@ -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]
############################################################