From 9bd054490fa3665e3837933348969cc72939a776 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Tue, 11 Jun 2024 14:32:01 -0700 Subject: [PATCH] refac --- backend/apps/webui/routers/tools.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/apps/webui/routers/tools.py b/backend/apps/webui/routers/tools.py index 8026493e3..b68ed32ee 100644 --- a/backend/apps/webui/routers/tools.py +++ b/backend/apps/webui/routers/tools.py @@ -176,4 +176,8 @@ async def delete_toolkit_by_id(request: Request, id: str, user=Depends(get_admin if id in TOOLS: del TOOLS[id] + # delete the toolkit file + toolkit_path = os.path.join(TOOLS_DIR, f"{id}.py") + os.remove(toolkit_path) + return result