Refine
This commit is contained in:
6
main.py
6
main.py
@@ -524,7 +524,8 @@ async def fast_get_pipe_schema(network: str) -> dict[str, dict[str, Any]]:
|
|||||||
return get_pipe_schema(network)
|
return get_pipe_schema(network)
|
||||||
|
|
||||||
@app.post("/addpipe/")
|
@app.post("/addpipe/")
|
||||||
async def fastapi_add_pipe(network: str, pipe: str, node1: str, node2: str, length: float = 0, diameter: float = 0, roughness: float = 0, minor_loss: float = 0, status: str = PIPE_STATUS_OPEN) -> ChangeSet:
|
async def fastapi_add_pipe(network: str, pipe: str, node1: str, node2: str, length: float = 0,
|
||||||
|
diameter: float = 0, roughness: float = 0, minor_loss: float = 0, status: str = PIPE_STATUS_OPEN) -> ChangeSet:
|
||||||
print('add pipe add pipe')
|
print('add pipe add pipe')
|
||||||
|
|
||||||
ps = { 'id' : pipe,
|
ps = { 'id' : pipe,
|
||||||
@@ -534,8 +535,7 @@ async def fastapi_add_pipe(network: str, pipe: str, node1: str, node2: str, leng
|
|||||||
'diameter' : diameter,
|
'diameter' : diameter,
|
||||||
'roughness' : roughness,
|
'roughness' : roughness,
|
||||||
'minor_loss' : minor_loss,
|
'minor_loss' : minor_loss,
|
||||||
'status' : status
|
'status' : status }
|
||||||
}
|
|
||||||
return add_pipe(network, ChangeSet(ps))
|
return add_pipe(network, ChangeSet(ps))
|
||||||
|
|
||||||
@app.post("/deletepipe/")
|
@app.post("/deletepipe/")
|
||||||
|
|||||||
Reference in New Issue
Block a user