mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 09:27:19 +02:00
Refactor #2752
This commit is contained in:
parent
c79fee5a49
commit
2148cc57e5
16 changed files with 935 additions and 24 deletions
|
@ -12,9 +12,10 @@ class EppConstraint
|
|||
def matches?(request)
|
||||
parsed_frame = Nokogiri::XML(request.params[:raw_frame])
|
||||
|
||||
unless [:keyrelay, :poll].include?(@type)
|
||||
unless [:keyrelay, :poll, :session].include?(@type)
|
||||
element = "//#{@type}:#{request.params[:action]}"
|
||||
return false if parsed_frame.xpath("#{element}", OBJECT_TYPES[@type]).none?
|
||||
# TODO: Support multiple schemas
|
||||
request.params[:schema] = OBJECT_TYPES[@type][@type].split('/').last
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue