1
0
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:
Tom Limoncelli
2018-02-27 09:38:39 -05:00
committed by GitHub
parent 1097c96fcc
commit e266e953d9
2 changed files with 4 additions and 1 deletions

View File

@@ -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"))