From b35a0865b96ac24720aeb88e9bdabf80906c5506 Mon Sep 17 00:00:00 2001 From: DingZQ Date: Fri, 24 Feb 2023 22:36:02 +0800 Subject: [PATCH] Return empty if cna't be locked --- main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 7a9b223..37cb7e9 100644 --- a/main.py +++ b/main.py @@ -84,7 +84,7 @@ async def fastapi_import_inp(network: str, req: Request): return import_inp(network, ChangeSet(ps)) @app.get("/exportinp/") -async def fastapi_export_inp(network: str): +async def fastapi_export_inp(network: str) -> ChangeSet: return export_inp(network) @app.post("/readinp/") @@ -126,7 +126,8 @@ async def fastapi_lock_project(network: str, req: Request): client_host = req.client.host if fastapi_is_locked(network, req) == False: lockedPrjs[network] = client_host - return client_host + return client_host + return "" @app.post("/unlockproject/") async def fastapi_unlock_project(network: str, req: Request):