fix: API delete endpoint cleans up Docker container before DB deletion (closes #106)

This commit is contained in:
clawbot 2026-02-20 03:33:04 -08:00
parent cd0354e86c
commit ec87915234

View File

@ -270,6 +270,9 @@ func (h *Handlers) HandleAPIDeleteApp() http.HandlerFunc {
return
}
// Stop and remove the Docker container before deleting the DB record
h.cleanupContainer(request.Context(), appID, application.Name)
deleteErr := h.appService.DeleteApp(request.Context(), application)
if deleteErr != nil {
h.log.Error("api: failed to delete app", "error", deleteErr)