mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 11:16:00 +02:00
Routes fix
This commit is contained in:
parent
db77334711
commit
ea51bb50b2
3 changed files with 6 additions and 7 deletions
|
@ -30,8 +30,6 @@ module Registry
|
|||
config.paths.add File.join('app', 'api'), glob: File.join('**', '*.rb')
|
||||
config.autoload_paths += Dir[Rails.root.join('app', 'api', '*')]
|
||||
|
||||
config.autoload_paths << Rails.root.join('lib')
|
||||
|
||||
# Active Record used to suppresses errors raised within
|
||||
# `after_rollback`/`after_commit` callbacks and only printed them to the logs.
|
||||
# In the next version, these errors will no longer be suppressed.
|
||||
|
|
|
@ -11,9 +11,11 @@ class EppConstraint
|
|||
def matches?(request)
|
||||
element = "//#{@type}:#{request.params[:action]}"
|
||||
parsed_frame = Nokogiri::XML(request.params[:raw_frame])
|
||||
ret = parsed_frame.xpath("#{element}", OBJECT_TYPES[@type]).any?
|
||||
request.params[:parsed_frame] = parsed_frame.remove_namespaces! if ret
|
||||
ret
|
||||
return false if parsed_frame.xpath("#{element}", OBJECT_TYPES[@type]).none?
|
||||
|
||||
request.params[:parsed_frame] = parsed_frame.remove_namespaces!
|
||||
request.params[:epp_object_type] = @type
|
||||
true
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue