Timothy J. Baek 11 meses atrás
pai
commit
9bd054490f
1 arquivos alterados com 4 adições e 0 exclusões
  1. 4 0
      backend/apps/webui/routers/tools.py

+ 4 - 0
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