mirror of
https://github.com/internetee/registry.git
synced 2025-05-28 12:31:21 +02:00
Start refactoring params_hash out of domains
This commit is contained in:
parent
fe883f4e2e
commit
64183c1dd8
3 changed files with 17 additions and 10 deletions
|
@ -58,12 +58,14 @@ class EppController < ApplicationController
|
|||
def validate_request
|
||||
validation_method = "validate_#{params[:action]}"
|
||||
return unless respond_to?(validation_method, true)
|
||||
handle_errors and return unless send(validation_method)
|
||||
send(validation_method)
|
||||
handle_errors and return if epp_errors.any?
|
||||
end
|
||||
|
||||
def epp_request_valid?(*selectors)
|
||||
selectors.each do |selector|
|
||||
el = params[:parsed_frame].css(selector).first
|
||||
full_selector = [@prefix, selector].join(' ')
|
||||
el = params[:parsed_frame].css(full_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