mirror of
https://github.com/internetee/registry.git
synced 2025-07-28 05:26:17 +02:00
Fixed codeclimate issues
This commit is contained in:
parent
aaa0e89cfe
commit
cadb0a65bb
2 changed files with 27 additions and 19 deletions
|
@ -13,8 +13,10 @@ module Repp
|
|||
|
||||
def load_xml
|
||||
cl_trid = "#{current_user.username}-#{Time.zone.now.to_i}"
|
||||
obj = ActionController::Base.helpers.sanitize(params[:obj])
|
||||
epp_action = ActionController::Base.helpers.sanitize(params[:epp_action])
|
||||
xml_dir_path = Rails.root.join('app/views/epp/sample_requests').to_s
|
||||
xml = File.read("#{xml_dir_path}/#{params[:obj]}/#{params[:epp_action]}.xml")
|
||||
xml = File.read("#{xml_dir_path}/#{obj}/#{epp_action}.xml")
|
||||
xml = prepare_payload(xml, cl_trid)
|
||||
|
||||
render_success(data: { xml: xml })
|
||||
|
@ -52,4 +54,4 @@ module Repp
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue