This commit is contained in:
Artur Beljajev 2019-02-01 13:28:18 +02:00
parent 9fab0a3000
commit 22e1523a99

View file

@ -5,7 +5,7 @@ xml.epp_head do
end
xml.resData do
xml.tag!('domain:infData', 'xmlns:domain' => 'https://epp.tld.ee/schema/domain-eis-1.0.xsd') do
xml.tag! 'domain:infData', 'xmlns:domain' => 'https://epp.tld.ee/schema/domain-eis-1.0.xsd' do
xml.tag!('domain:name', @domain.name)
xml.tag!('domain:roid', @domain.roid)
@domain.statuses.each do |s|
@ -27,8 +27,13 @@ xml.epp_head do
@nameservers.each do |x|
xml.tag!('domain:hostAttr') do
xml.tag!('domain:hostName', x.hostname)
x.ipv4.each{|ip| xml.tag!('domain:hostAddr', ip, 'ip' => 'v4') } if x.ipv4.present?
x.ipv6.each{|ip| xml.tag!('domain:hostAddr', ip, 'ip' => 'v6') } if x.ipv6.present?
if x.ipv4.present?
x.ipv4.each { |ip| xml.tag!('domain:hostAddr', ip, 'ip' => 'v4') }
end
if x.ipv6.present?
x.ipv6.each { |ip| xml.tag!('domain:hostAddr', ip, 'ip' => 'v6') }
end
end
end
end
@ -57,8 +62,10 @@ xml.epp_head do
end
if @domain.dnskeys.any?
ds_data = Setting.ds_data_allowed ? @domain.dnskeys.find_all { |key| key.ds_digest.present? } : []
key_data = Setting.key_data_allowed ? @domain.dnskeys.find_all { |key| key.public_key.present? } : []
ds_data = Setting.ds_data_allowed ?
@domain.dnskeys.find_all { |key| key.ds_digest.present? } : []
key_data = Setting.key_data_allowed ?
@domain.dnskeys.find_all { |key| key.public_key.present? } : []
xml.extension do
def tag_key_data(xml, key)