Return empty if cna't be locked

This commit is contained in:
DingZQ
2023-02-24 22:36:02 +08:00
parent 6b956e6c09
commit b35a0865b9

View File

@@ -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):