X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/d57dd1f4da4d4605f534607b69944e3c977e4db5..04c6d38649d0794eeb09e3b62e866efe6a9f95e2:/app/controllers/api/nodes_controller.rb diff --git a/app/controllers/api/nodes_controller.rb b/app/controllers/api/nodes_controller.rb index 5aad78dbf..b7165b2fe 100644 --- a/app/controllers/api/nodes_controller.rb +++ b/app/controllers/api/nodes_controller.rb @@ -2,16 +2,14 @@ module Api class NodesController < ApiController - before_action :check_api_writable, :only => [:create, :update, :delete] - before_action :authorize, :only => [:create, :update, :delete] + before_action :check_api_writable, :only => [:create, :update, :destroy] + before_action :authorize, :only => [:create, :update, :destroy] authorize_resource - before_action :require_public_data, :only => [:create, :update, :delete] - around_action :api_call_handle_error, :api_call_timeout - - before_action :set_request_formats, :except => [:create, :update, :delete] - before_action :check_rate_limit, :only => [:create, :update, :delete] + before_action :require_public_data, :only => [:create, :update, :destroy] + before_action :set_request_formats, :except => [:create, :update, :destroy] + before_action :check_rate_limit, :only => [:create, :update, :destroy] # Dump the details on many nodes whose ids are given in the "nodes" parameter. def index @@ -70,7 +68,7 @@ module Api # Delete a node. Doesn't actually delete it, but retains its history # in a wiki-like way. We therefore treat it like an update, so the delete # method returns the new version number. - def delete + def destroy node = Node.find(params[:id]) new_node = Node.from_xml(request.raw_post)