summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Phillips <chad@apartmentlines.com>2017-11-27 09:43:52 -0700
committerChad Phillips <chad@apartmentlines.com>2017-11-27 09:43:52 -0700
commit76041df0a6a08cd42e7ab7ced8598d3a83216759 (patch)
tree070424899a4742ddcc9971443b1d555894348b4c
parentbump version (diff)
Pass cananocial name when updating records
The PowerDNS API spec requires a full canonical name when performing a REPLACE changeset, however the power_dnsex wrapper is inconsistent with this spec in its update_record() method. This fixes the inconsistency so that the record map behaves the same as the create_record() method.
-rw-r--r--lib/powerdnsex/managers/records_manager.ex2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/powerdnsex/managers/records_manager.ex b/lib/powerdnsex/managers/records_manager.ex
index 9bc3510..c5dd051 100644
--- a/lib/powerdnsex/managers/records_manager.ex
+++ b/lib/powerdnsex/managers/records_manager.ex
@@ -21,7 +21,7 @@ defmodule PowerDNSex.Managers.RecordsManager do
end
def update(%Zone{} = zone, %{name: rrset_name, type: rrset_type} = rrset_attrs) do
- rrset_find_params = %{name: "#{rrset_name}.#{zone.name}", type: rrset_type}
+ rrset_find_params = %{name: rrset_name, type: rrset_type}
rrset = RRSet.find(zone.rrsets, rrset_find_params)
if rrset do