diff --git a/main.py b/main.py index 6627319..7d2f49f 100644 --- a/main.py +++ b/main.py @@ -66,7 +66,7 @@ async def fastapi_list_projects() -> list[str]: return list_project() @app.get("/haveproject/") -async def fastapi_have_project(network: str): +sync def fastapi_have_project(network: str): return have_project(network) @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: ps = { 'id' : pipe, 'status' : status } - ret = set_pipe(network, ChangeSet(ps)) - print(ret) - return ret + + print(status) + print(ps) + + #ret = set_pipe(network, ChangeSet(ps)) + #print(ret) + #return ret + return status @app.get("/getpipeproperties/") async def fastapi_get_pipe_properties(network: str, pipe: str) -> dict[str, Any]: