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

Method handleGetDomain

internal/httpapi/domains.go:324–337  ·  view source on GitHub ↗
(ctx context.Context, in *DomainParam)

Source from the content-addressed store, hash-verified

322}
323
324func (s *Server) handleGetDomain(ctx context.Context, in *DomainParam) (*domainOutput, error) {
325 user, err := s.requireAccountUser(ctx)
326 if err != nil {
327 return nil, err
328 }
329 if in.Domain == "" {
330 return nil, NewError(http.StatusBadRequest, "invalid_request", "domain is required")
331 }
332 d, err := s.deps.LookupDomain(ctx, in.Domain, user.ID)
333 if err != nil || d == nil {
334 return nil, NewError(http.StatusNotFound, "not_found", "domain not found")
335 }
336 return &domainOutput{Body: s.domainView(d)}, nil
337}
338
339// RegisterDomainRequest is the create-domain body. `domain` is required (D-4):
340// it is the only field, so leaving it optional generated an SDK signature that

Callers

nothing calls this directly

Calls 4

requireAccountUserMethod · 0.95
domainViewMethod · 0.95
NewErrorFunction · 0.85
LookupDomainMethod · 0.80

Tested by

no test coverage detected