From: Anton Khorev Date: Thu, 28 Mar 2024 08:18:31 +0000 (+0300) Subject: Remove require "xml/libxml" from controllers X-Git-Tag: live~706^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/fba552873173064c24a3d1eeceb64d3a9162139e?hp=99bed16f9a905bf7a167f927cce5f15f9064fd20 Remove require "xml/libxml" from controllers --- diff --git a/app/controllers/api/changesets_controller.rb b/app/controllers/api/changesets_controller.rb index 9a179135f..78a5b48e3 100644 --- a/app/controllers/api/changesets_controller.rb +++ b/app/controllers/api/changesets_controller.rb @@ -2,8 +2,6 @@ module Api class ChangesetsController < ApiController - require "xml/libxml" - before_action :check_api_writable, :only => [:create, :update, :upload, :subscribe, :unsubscribe] before_action :check_api_readable, :except => [:create, :update, :upload, :download, :query, :subscribe, :unsubscribe] before_action :setup_user_auth, :only => [:show] diff --git a/app/controllers/api/nodes_controller.rb b/app/controllers/api/nodes_controller.rb index 0604aa356..dc7d04dc5 100644 --- a/app/controllers/api/nodes_controller.rb +++ b/app/controllers/api/nodes_controller.rb @@ -2,8 +2,6 @@ module Api class NodesController < ApiController - require "xml/libxml" - before_action :check_api_writable, :only => [:create, :update, :delete] before_action :check_api_readable, :except => [:create, :update, :delete] before_action :authorize, :only => [:create, :update, :delete] diff --git a/app/controllers/api/old_controller.rb b/app/controllers/api/old_controller.rb index 7c9c32e63..5b16b453d 100644 --- a/app/controllers/api/old_controller.rb +++ b/app/controllers/api/old_controller.rb @@ -3,8 +3,6 @@ # nodes, ways and relations are basically identical. module Api class OldController < ApiController - require "xml/libxml" - before_action :check_api_readable before_action :check_api_writable, :only => [:redact] before_action :setup_user_auth, :only => [:history, :show] diff --git a/app/controllers/api/relations_controller.rb b/app/controllers/api/relations_controller.rb index 3ce39c4cf..e82ac6368 100644 --- a/app/controllers/api/relations_controller.rb +++ b/app/controllers/api/relations_controller.rb @@ -1,7 +1,5 @@ module Api class RelationsController < ApiController - require "xml/libxml" - before_action :check_api_writable, :only => [:create, :update, :delete] before_action :check_api_readable, :except => [:create, :update, :delete] before_action :authorize, :only => [:create, :update, :delete] diff --git a/app/controllers/api/ways_controller.rb b/app/controllers/api/ways_controller.rb index 0828e311f..f8254d802 100644 --- a/app/controllers/api/ways_controller.rb +++ b/app/controllers/api/ways_controller.rb @@ -1,7 +1,5 @@ module Api class WaysController < ApiController - require "xml/libxml" - before_action :check_api_writable, :only => [:create, :update, :delete] before_action :check_api_readable, :except => [:create, :update, :delete] before_action :authorize, :only => [:create, :update, :delete] diff --git a/app/controllers/changesets_controller.rb b/app/controllers/changesets_controller.rb index 613a3ee2a..812db6016 100644 --- a/app/controllers/changesets_controller.rb +++ b/app/controllers/changesets_controller.rb @@ -4,7 +4,6 @@ class ChangesetsController < ApplicationController include UserMethods layout "site" - require "xml/libxml" before_action :authorize_web before_action :set_locale