fix(namecom): update record using "" when the host is @

This commit is contained in:
Quentin McGaw
2024-06-16 08:35:04 +00:00
parent d3ec047483
commit 6cc0b9b2a1

View File

@@ -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,