diff --git a/server/internal/handlers/user_handlers.go b/server/internal/handlers/user_handlers.go index 4a0a7d9..210dd64 100644 --- a/server/internal/handlers/user_handlers.go +++ b/server/internal/handlers/user_handlers.go @@ -1,7 +1,6 @@ package handlers import ( - "database/sql" "encoding/json" "net/http" @@ -155,18 +154,6 @@ func (h *Handler) DeleteAccount() http.HandlerFunc { } } - // Start transaction for consistent deletion - tx, err := h.DB.Begin() - if err != nil { - http.Error(w, "Failed to start transaction", http.StatusInternalServerError) - return - } - defer func() { - if err := tx.Rollback(); err != nil && err != sql.ErrTxDone { - http.Error(w, "Failed to rollback transaction", http.StatusInternalServerError) - } - }() - // Get user's workspaces for cleanup workspaces, err := h.DB.GetWorkspacesByUserID(ctx.UserID) if err != nil { @@ -188,11 +175,6 @@ func (h *Handler) DeleteAccount() http.HandlerFunc { return } - if err := tx.Commit(); err != nil { - http.Error(w, "Failed to commit transaction", http.StatusInternalServerError) - return - } - respondJSON(w, map[string]string{"message": "Account deleted successfully"}) } }