mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
Fix DNSimple crashes on Alias: (#322)
* Fix https://github.com/StackExchange/dnscontrol/issues/321
This commit is contained in:
@@ -84,6 +84,9 @@ func (c *DnsimpleApi) GetDomainCorrections(dc *models.DomainConfig) ([]*models.C
|
||||
}
|
||||
rec.SetLabel(r.Name, dc.Name)
|
||||
switch rtype := r.Type; rtype {
|
||||
case "ALIAS":
|
||||
rec.Type = r.Type
|
||||
rec.SetTarget(r.Content)
|
||||
case "MX":
|
||||
if err := rec.SetTargetMX(uint16(r.Priority), r.Content); err != nil {
|
||||
panic(errors.Wrap(err, "unparsable record received from dnsimple"))
|
||||
|
Reference in New Issue
Block a user