Return empty if cna't be locked
This commit is contained in:
5
main.py
5
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):
|
||||
|
||||
Reference in New Issue
Block a user