mirror of
https://github.com/qdm12/ddns-updater.git
synced 2026-03-31 06:24:01 -04:00
fix(namecom): update record using "" when the host is @
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user