(ctx context.Context, in *deleteAccountInput)
| 211 | } |
| 212 | |
| 213 | func (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 | |
| 231 | func (s *Server) handleGetMyLimits(ctx context.Context, _ *struct{}) (*accountOutput, error) { |
| 232 | // whoami works for BOTH scopes (A-1): an agent-scoped credential must be |
nothing calls this directly
no test coverage detected