1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

HOSTINGDE: Fix modify referencing incorrect record id (fixes #2066) (#2092)

Co-authored-by: Yannik Sembritzki <yannik@sembritzki.org>
This commit is contained in:
Yannik Sembritzki
2023-02-23 00:56:25 +05:30
committed by GitHub
parent fc3a217dc1
commit 486851633a
2 changed files with 3 additions and 3 deletions

View File

@@ -137,14 +137,14 @@ func (hp *hostingdeProvider) updateZone(zc *zoneConfig, DnsSecOptions *dnsSecOpt
toDelete := []*record{}
for _, d := range del {
r := recordToNative(d.Existing)
r.ID = d.Existing.Original.(*record).ID
r.ID = d.Existing.Original.(record).ID
toDelete = append(toDelete, r)
}
toModify := []*record{}
for _, m := range mod {
r := recordToNative(m.Desired)
r.ID = m.Existing.Original.(*record).ID
r.ID = m.Existing.Original.(record).ID
toModify = append(toModify, r)
}

View File

@@ -138,7 +138,7 @@ type responseData struct {
TotalPages uint `json:"totalPages"`
}
func (r *record) nativeToRecord(domain string) *models.RecordConfig {
func (r record) nativeToRecord(domain string) *models.RecordConfig {
// normalize cname,mx,ns records with dots to be consistent with our config format.
if r.Type == "ALIAS" || r.Type == "CNAME" || r.Type == "MX" || r.Type == "NS" || r.Type == "SRV" {
if r.Content != "." {