(ctx context.Context, in *DomainParam)
| 322 | } |
| 323 | |
| 324 | func (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 |
nothing calls this directly
no test coverage detected