1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00
This commit is contained in:
Tom Limoncelli
2023-06-21 18:41:01 -06:00
parent 10f06c2834
commit 1c2c207790
13 changed files with 63 additions and 98 deletions

View File

@@ -653,11 +653,9 @@ func (a *azurednsProvider) recordToNative(recordKey models.RecordKey, recordConf
recordSet.Properties.TxtRecords = []*adns.TxtRecord{}
}
// Empty TXT record needs to have no value set in it's properties
if !(len(rec.TxtStrings) == 1 && rec.TxtStrings[0] == "") {
var txts []*string
for _, txt := range rec.TxtStrings {
txts = append(txts, to.StringPtr(txt))
}
tt := rec.GetTargetField()
if tt != "" {
txts := []*string{to.StringPtr(tt)}
recordSet.Properties.TxtRecords = append(recordSet.Properties.TxtRecords, &adns.TxtRecord{Value: txts})
}
case "MX":
@@ -729,11 +727,9 @@ func (a *azurednsProvider) recordToNativeDiff2(recordKey models.RecordKey, recor
recordSet.Properties.TxtRecords = []*adns.TxtRecord{}
}
// Empty TXT record needs to have no value set in it's properties
if !(len(rec.TxtStrings) == 1 && rec.TxtStrings[0] == "") {
var txts []*string
for _, txt := range rec.TxtStrings {
txts = append(txts, to.StringPtr(txt))
}
tt := rec.GetTargetField()
if tt != "" {
txts := []*string{to.StringPtr(tt)}
recordSet.Properties.TxtRecords = append(recordSet.Properties.TxtRecords, &adns.TxtRecord{Value: txts})
}
case "MX":