mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-02-24 23:53:01 +08:00
INWX: fix apex domains (#1221)
INWX has changed their API to use an empty string () instead of the common @. Fix that by converting between the two.
This commit is contained in:
parent
a6b9609cd5
commit
f63302b978
1 changed files with 9 additions and 1 deletions
|
@ -161,11 +161,16 @@ func newInwxDsp(m map[string]string, metadata json.RawMessage) (providers.DNSSer
|
|||
func makeNameserverRecordRequest(domain string, rec *models.RecordConfig) *goinwx.NameserverRecordRequest {
|
||||
content := rec.GetTargetField()
|
||||
|
||||
name := rec.GetLabel()
|
||||
if name == "@" {
|
||||
name = ""
|
||||
}
|
||||
|
||||
req := &goinwx.NameserverRecordRequest{
|
||||
Domain: domain,
|
||||
Type: rec.Type,
|
||||
Content: content,
|
||||
Name: rec.GetLabel(),
|
||||
Name: name,
|
||||
TTL: int(rec.TTL),
|
||||
}
|
||||
|
||||
|
@ -299,6 +304,9 @@ func (api *inwxAPI) GetZoneRecords(domain string) (models.Records, error) {
|
|||
var records = []*models.RecordConfig{}
|
||||
|
||||
for _, record := range info.Records {
|
||||
if record.Name == "" {
|
||||
record.Name = "@"
|
||||
}
|
||||
if record.Type == "SOA" {
|
||||
continue
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue