mirror of
https://github.com/internetee/registry.git
synced 2025-08-06 01:35:10 +02:00
Introduce BaseController for registrar area
This commit is contained in:
parent
955c7bcd6e
commit
92d8008c15
14 changed files with 785 additions and 746 deletions
|
@ -1,23 +1,25 @@
|
|||
class Registrar::XmlConsolesController < Registrar::DeppController # EPP controller
|
||||
authorize_resource class: false
|
||||
class Registrar
|
||||
class XmlConsolesController < DeppController
|
||||
authorize_resource class: false
|
||||
|
||||
def show
|
||||
end
|
||||
|
||||
def create
|
||||
begin
|
||||
@result = depp_current_user.server.request(params[:payload])
|
||||
rescue
|
||||
@result = 'CONNECTION ERROR - Is the EPP server running?'
|
||||
def show
|
||||
end
|
||||
render :show
|
||||
end
|
||||
|
||||
def load_xml
|
||||
cl_trid = "#{depp_current_user.tag}-#{Time.zone.now.to_i}"
|
||||
xml_dir_path = Rails.root + 'app/views/registrar/xml_consoles/epp_requests'
|
||||
xml = File.read("#{xml_dir_path}/#{params[:obj]}/#{params[:epp_action]}.xml")
|
||||
xml.gsub!('<clTRID>ABC-12345</clTRID>', "<clTRID>#{cl_trid}</clTRID>")
|
||||
render text: xml
|
||||
def create
|
||||
begin
|
||||
@result = depp_current_user.server.request(params[:payload])
|
||||
rescue
|
||||
@result = 'CONNECTION ERROR - Is the EPP server running?'
|
||||
end
|
||||
render :show
|
||||
end
|
||||
|
||||
def load_xml
|
||||
cl_trid = "#{depp_current_user.tag}-#{Time.zone.now.to_i}"
|
||||
xml_dir_path = Rails.root + 'app/views/registrar/xml_consoles/epp_requests'
|
||||
xml = File.read("#{xml_dir_path}/#{params[:obj]}/#{params[:epp_action]}.xml")
|
||||
xml.gsub!('<clTRID>ABC-12345</clTRID>', "<clTRID>#{cl_trid}</clTRID>")
|
||||
render text: xml
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue