From 6cf57e4850b6aece2a88d1d283bb99da5db8abf7 Mon Sep 17 00:00:00 2001 From: DingZQ Date: Sun, 30 Oct 2022 23:12:40 +0800 Subject: [PATCH] Add method list_projects --- main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.py b/main.py index 053d6fa..d4fe99e 100644 --- a/main.py +++ b/main.py @@ -32,6 +32,10 @@ if not os.path.exists(tmpDir): app = FastAPI() # project operations +@app.get('/listprojects/') +async def fastapi_list_projects() -> list[str]: + return list_project() + @app.get("/haveproject/") async def fastapi_have_project(network: str): return have_project(network)