mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 01:33:36 +02:00
parent
ffd29f6a67
commit
b9df5aa92d
11 changed files with 411 additions and 281 deletions
|
@ -40,13 +40,22 @@ module Depp
|
|||
keys = Domain.create_dnskeys_hash(domain_params)
|
||||
dns_hash[:_anonymus] = keys if keys.any?
|
||||
|
||||
xml = epp_xml.create({
|
||||
name: { value: domain_params[:name] },
|
||||
period: { value: domain_params[:period].to_s[0], attrs: { unit: domain_params[:period].to_s[1] } },
|
||||
ns: Domain.create_nameservers_hash(domain_params),
|
||||
registrant: { value: domain_params[:registrant] },
|
||||
_anonymus: Domain.create_contacts_hash(domain_params)
|
||||
}, dns_hash, Domain.construct_custom_params_hash(domain_params))
|
||||
if domain_params[:nameservers_attributes].select { |key, value| value['hostname'].present? }.any?
|
||||
xml = epp_xml.create({
|
||||
name: { value: domain_params[:name] },
|
||||
period: { value: domain_params[:period].to_s[0], attrs: { unit: domain_params[:period].to_s[1] } },
|
||||
ns: Domain.create_nameservers_hash(domain_params),
|
||||
registrant: { value: domain_params[:registrant] },
|
||||
_anonymus: Domain.create_contacts_hash(domain_params)
|
||||
}, dns_hash, Domain.construct_custom_params_hash(domain_params))
|
||||
else
|
||||
xml = epp_xml.create({
|
||||
name: { value: domain_params[:name] },
|
||||
period: { value: domain_params[:period].to_s[0], attrs: { unit: domain_params[:period].to_s[1] } },
|
||||
registrant: { value: domain_params[:registrant] },
|
||||
_anonymus: Domain.create_contacts_hash(domain_params)
|
||||
}, dns_hash, Domain.construct_custom_params_hash(domain_params))
|
||||
end
|
||||
|
||||
current_user.request(xml)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue