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

Method handleListDomains

internal/httpapi/domains.go:308–322  ·  view source on GitHub ↗
(ctx context.Context, _ *struct{})

Source from the content-addressed store, hash-verified

306}
307
308func (s *Server) handleListDomains(ctx context.Context, _ *struct{}) (*listDomainsOutput, error) {
309 user, err := s.requireAccountUser(ctx)
310 if err != nil {
311 return nil, err
312 }
313 domains, err := s.deps.ListDomains(ctx, user.ID)
314 if err != nil {
315 return nil, NewError(http.StatusInternalServerError, "internal_error", "failed to list domains")
316 }
317 items := make([]DomainView, 0, len(domains))
318 for i := range domains {
319 items = append(items, s.domainView(&domains[i]))
320 }
321 return &listDomainsOutput{Body: NewPage(items, "")}, nil
322}
323
324func (s *Server) handleGetDomain(ctx context.Context, in *DomainParam) (*domainOutput, error) {
325 user, err := s.requireAccountUser(ctx)

Callers

nothing calls this directly

Calls 5

requireAccountUserMethod · 0.95
domainViewMethod · 0.95
NewErrorFunction · 0.85
makeFunction · 0.85
NewPageFunction · 0.85

Tested by

no test coverage detected