This commit is contained in:
Artur Beljajev 2019-02-18 15:05:52 +02:00
parent 2862dd81d1
commit b81c971b37
3 changed files with 11 additions and 33 deletions

View file

@ -10,17 +10,17 @@ class Epp::DomainsController < EppController
if domain_name.at_auction?
@name = domain_name
@status = 'At auction'
render_epp_response '/epp/domains/info_auction'
render_epp_response '/epp/domains/info/unregistered_domain'
return
elsif domain_name.awaiting_payment?
@name = domain_name
@status = 'Awaiting payment'
render_epp_response '/epp/domains/info_auction'
render_epp_response '/epp/domains/info/unregistered_domain'
return
elsif domain_name.pending_registration?
@name = domain_name
@status = 'Reserved'
render_epp_response '/epp/domains/info_auction'
render_epp_response '/epp/domains/info/unregistered_domain'
return
end
end
@ -42,8 +42,7 @@ class Epp::DomainsController < EppController
end
render_epp_response '/epp/domains/info/registered_domain'
else
if domain_name.blocked?
elsif domain_name.blocked?
@name = domain_name
@status = 'Blocked'
render_epp_response '/epp/domains/info/unregistered_domain'
@ -53,7 +52,6 @@ class Epp::DomainsController < EppController
render_epp_response '/epp/domains/info/unregistered_domain'
end
end
end
def create
authorize! :create, Epp::Domain

View file

@ -53,10 +53,6 @@ module DNS
Whois::Record.refresh(self)
end
def to_s
name
end
def registered?
Domain.find_by_idn(name)
end

View file

@ -1,16 +0,0 @@
xml.epp_head do
xml.response do
xml.result('code' => '1000') do
xml.msg 'Command completed successfully'
end
xml.resData do
xml.tag! 'domain:infData', 'xmlns:domain' => 'https://epp.tld.ee/schema/domain-eis-1.0.xsd' do
xml.tag!('domain:name', @name)
xml.tag!('domain:status', 's' => @status)
end
end
render('epp/shared/trID', builder: xml)
end
end