From 76041df0a6a08cd42e7ab7ced8598d3a83216759 Mon Sep 17 00:00:00 2001 From: Chad Phillips Date: Mon, 27 Nov 2017 09:43:52 -0700 Subject: 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. --- lib/powerdnsex/managers/records_manager.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3