mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 08:52:04 +02:00
Merge branch 'master' of github.com:internetee/registry
This commit is contained in:
commit
ede426e22e
4 changed files with 48 additions and 7 deletions
|
@ -6,7 +6,7 @@ module Epp::DomainsHelper
|
|||
handle_errors(@domain) and return unless @domain.parse_and_attach_domain_dependencies(@ph, parsed_frame)
|
||||
handle_errors(@domain) and return unless @domain.save
|
||||
|
||||
render '/epp/domains/success'
|
||||
render '/epp/domains/create'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
17
app/views/epp/domains/create.xml.builder
Normal file
17
app/views/epp/domains/create.xml.builder
Normal file
|
@ -0,0 +1,17 @@
|
|||
xml.epp_head do
|
||||
xml.response do
|
||||
xml.result('code' => '1000') do
|
||||
xml.msg 'Command completed successfully'
|
||||
end
|
||||
|
||||
xml.resData do
|
||||
xml.tag!('domain:creData', 'xmlns:domain' => 'urn:ietf:params:xml:ns:domain-1.0') do
|
||||
xml.tag!('domain:name', @domain.name)
|
||||
xml.tag!('domain:crDate', @domain.created_at)
|
||||
xml.tag!('domain:exDate', @domain.valid_to)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
xml << render('/epp/shared/trID')
|
||||
end
|
|
@ -24,7 +24,15 @@ xml.epp_head do
|
|||
|
||||
xml.tag!('domain:ns') do
|
||||
@domain.nameservers.each do |x|
|
||||
xml.tag!('domain:hostObj', x.hostname)
|
||||
if x.ipv4.present? || x.ipv6.present?
|
||||
xml.tag!('domain:hostAttr') do
|
||||
xml.tag!('domain:hostName', x.hostname)
|
||||
xml.tag!('domain:hostAddr', x.ipv4, 'ip' => 'v4') if x.ipv4.present?
|
||||
xml.tag!('domain:hostAddr', x.ipv6, 'ip' => 'v6') if x.ipv6.present?
|
||||
end
|
||||
else
|
||||
xml.tag!('domain:hostObj', x.hostname)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue