From 507783b1bcfe0dd481e27ebd37c4892fbfdd1db6 Mon Sep 17 00:00:00 2001 From: DingZQ Date: Mon, 3 Oct 2022 19:08:24 +0800 Subject: [PATCH] Refine unlock method --- main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index e991c2e..fe6577e 100644 --- a/main.py +++ b/main.py @@ -77,8 +77,9 @@ async def fastapi_lock_project(network: str, id: str): return True @app.post("/unlockproject/") -async def fastapi_unlock_project(network: str): - del lockedPrjs[network] +async def fastapi_unlock_project(network: str, id: str): + if lockedPrjs[network] == id: + del lockedPrjs[network] return True # undo/redo