Timothy J. Baek 11 달 전
부모
커밋
9bd054490f
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  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:
         if id in TOOLS:
             del TOOLS[id]
             del TOOLS[id]
 
 
+        # delete the toolkit file
+        toolkit_path = os.path.join(TOOLS_DIR, f"{id}.py")
+        os.remove(toolkit_path)
+
     return result
     return result