diff options
Diffstat (limited to 'lib/powerdnsex/managers/zones_manager.ex')
-rw-r--r-- | lib/powerdnsex/managers/zones_manager.ex | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/powerdnsex/managers/zones_manager.ex b/lib/powerdnsex/managers/zones_manager.ex index 0430223..c7ec1ab 100644 --- a/lib/powerdnsex/managers/zones_manager.ex +++ b/lib/powerdnsex/managers/zones_manager.ex @@ -56,8 +56,11 @@ defmodule PowerDNSex.Managers.ZonesManager do end defp decode_body(body) do - body + zone = body |> Poison.decode!(as: %Zone{rrsets: [%ResourceRecordSet{records: [%Record{}]}]}) + + nameservers = ResourceRecordSet.nameservers(zone.rrsets) + Map.put(zone, :nameservers, nameservers) end end |