mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 12:08:27 +02:00
Parsed frame accessible from only params
This commit is contained in:
parent
fe74c0bd64
commit
3ed2cddad4
4 changed files with 13 additions and 17 deletions
|
@ -24,10 +24,6 @@ module Epp::Common
|
|||
@params_hash ||= Hash.from_xml(params[:frame]).with_indifferent_access
|
||||
end
|
||||
|
||||
def parsed_frame
|
||||
@parsed_frame ||= Nokogiri::XML(params[:frame]).remove_namespaces!
|
||||
end
|
||||
|
||||
def epp_session
|
||||
cookie = env['rack.request.cookie_hash'] || {}
|
||||
EppSession.find_or_initialize_by(session_id: cookie['session'])
|
||||
|
@ -66,7 +62,7 @@ module Epp::Common
|
|||
|
||||
def epp_request_valid?(*selectors)
|
||||
selectors.each do |selector|
|
||||
el = parsed_frame.css(selector).first
|
||||
el = params[:parsed_frame].css(selector).first
|
||||
epp_errors << {
|
||||
code: '2003',
|
||||
msg: I18n.t('errors.messages.required_parameter_missing', key: el.try(:name) || selector)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue