Skip to content

Commit

Permalink
fix(namecom): update record using "" when the host is @
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed Jun 26, 2024
1 parent d3ec047 commit 6cc0b9b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/provider/providers/namecom/updaterecord.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,17 @@ func (p *Provider) updateRecord(ctx context.Context, client *http.Client,
User: url.UserPassword(p.username, p.token),
}

host := ""
if p.host != "@" {
host = p.host
}
postRecordsParams := struct {
Host string `json:"host"`
Type string `json:"type"`
Answer string `json:"answer"`
TTL *uint32 `json:"ttl,omitempty"`
}{
Host: p.host,
Host: host,
Type: recordType,
Answer: ip.String(),
TTL: p.ttl,
Expand Down

0 comments on commit 6cc0b9b

Please sign in to comment.