Upate
This commit is contained in:
13
main.py
13
main.py
@@ -66,7 +66,7 @@ async def fastapi_list_projects() -> list[str]:
|
|||||||
return list_project()
|
return list_project()
|
||||||
|
|
||||||
@app.get("/haveproject/")
|
@app.get("/haveproject/")
|
||||||
async def fastapi_have_project(network: str):
|
sync def fastapi_have_project(network: str):
|
||||||
return have_project(network)
|
return have_project(network)
|
||||||
|
|
||||||
@app.post("/createproject/")
|
@app.post("/createproject/")
|
||||||
@@ -799,9 +799,14 @@ async def fastapi_set_pipe_minor_loss(network: str, pipe: str, minor_loss: float
|
|||||||
async def fastapi_set_pipe_status(network: str, pipe: str, status: str) -> ChangeSet:
|
async def fastapi_set_pipe_status(network: str, pipe: str, status: str) -> ChangeSet:
|
||||||
ps = { 'id' : pipe,
|
ps = { 'id' : pipe,
|
||||||
'status' : status }
|
'status' : status }
|
||||||
ret = set_pipe(network, ChangeSet(ps))
|
|
||||||
print(ret)
|
print(status)
|
||||||
return ret
|
print(ps)
|
||||||
|
|
||||||
|
#ret = set_pipe(network, ChangeSet(ps))
|
||||||
|
#print(ret)
|
||||||
|
#return ret
|
||||||
|
return status
|
||||||
|
|
||||||
@app.get("/getpipeproperties/")
|
@app.get("/getpipeproperties/")
|
||||||
async def fastapi_get_pipe_properties(network: str, pipe: str) -> dict[str, Any]:
|
async def fastapi_get_pipe_properties(network: str, pipe: str) -> dict[str, Any]:
|
||||||
|
|||||||
Reference in New Issue
Block a user