Add API to get all pipes

This commit is contained in:
DingZQ
2025-03-29 16:30:15 +08:00
parent 94773a59f8
commit 1dafaa6dcc
4 changed files with 30 additions and 1 deletions

View File

@@ -1018,6 +1018,11 @@ async def fastapi_set_pipe_status(network: str, pipe: str, status: str) -> Chang
async def fastapi_get_pipe_properties(network: str, pipe: str) -> dict[str, Any]:
return get_pipe(network, pipe)
# DingZQ, 2025-03-29
@app.get('/getallpipeproperties/')
async def fastapi_get_all_pipe_properties(network: str) -> list[dict[str, Any]]:
return get_all_pipes(network)
@app.post("/setpipeproperties/",response_model=None)
async def fastapi_set_pipe_properties(network: str, pipe: str, req: Request) -> ChangeSet:
props = await req.json()