Refine setjuncitonproperties
This commit is contained in:
4
main.py
4
main.py
@@ -262,11 +262,11 @@ async def fastapi_get_junction_properties(network: str, junction: str) -> dict[s
|
|||||||
return get_junction(network, junction)
|
return get_junction(network, junction)
|
||||||
|
|
||||||
@app.post("/setjunctionproperties/")
|
@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
|
ps = { 'id' : junction } | props
|
||||||
return set_junction(network, ChangeSet(ps))
|
return set_junction(network, ChangeSet(ps))
|
||||||
|
|
||||||
|
|
||||||
############################################################
|
############################################################
|
||||||
# reservoir 3.[RESERVOIRS]
|
# reservoir 3.[RESERVOIRS]
|
||||||
############################################################
|
############################################################
|
||||||
|
|||||||
Reference in New Issue
Block a user