MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / handleDeleteAccount

Method handleDeleteAccount

internal/httpapi/account.go:213–229  ·  view source on GitHub ↗
(ctx context.Context, in *deleteAccountInput)

Source from the content-addressed store, hash-verified

211}
212
213func (s *Server) handleDeleteAccount(ctx context.Context, in *deleteAccountInput) (*deleteAccountOutput, error) {
214 user, err := s.requireAccountUser(ctx)
215 if err != nil {
216 return nil, err
217 }
218 if in.Confirm != "DELETE" {
219 return nil, NewError(http.StatusBadRequest, "confirmation_required", "add ?confirm=DELETE to the request to proceed — this is irreversible")
220 }
221 if s.deps.DeleteUserData == nil {
222 return nil, NewError(http.StatusInternalServerError, "internal_error", "delete unavailable")
223 }
224 res, err := s.deps.DeleteUserData(ctx, user)
225 if err != nil {
226 return nil, NewError(http.StatusInternalServerError, "internal_error", "failed to delete user data")
227 }
228 return &deleteAccountOutput{Body: res}, nil
229}
230
231func (s *Server) handleGetMyLimits(ctx context.Context, _ *struct{}) (*accountOutput, error) {
232 // whoami works for BOTH scopes (A-1): an agent-scoped credential must be

Callers

nothing calls this directly

Calls 3

requireAccountUserMethod · 0.95
NewErrorFunction · 0.85
DeleteUserDataMethod · 0.80

Tested by

no test coverage detected