before_action :require_public_data, :only => [:create, :update, :delete]
before_action :check_api_writable, :only => [:create, :update, :delete]
before_action :check_api_readable, :except => [:create, :update, :delete]
before_action :require_public_data, :only => [:create, :update, :delete]
before_action :check_api_writable, :only => [:create, :update, :delete]
before_action :check_api_readable, :except => [:create, :update, :delete]
around_action :api_call_handle_error, :api_call_timeout
# Create a node from XML.
around_action :api_call_handle_error, :api_call_timeout
# Create a node from XML.
unless new_node && new_node.id == node.id
fail OSM::APIBadUserInput.new("The id in the url (#{node.id}) is not the same as provided in the xml (#{new_node.id})")
end
unless new_node && new_node.id == node.id
fail OSM::APIBadUserInput.new("The id in the url (#{node.id}) is not the same as provided in the xml (#{new_node.id})")
end
node.update_from(new_node, @user)
render :text => node.version.to_s, :content_type => "text/plain"
end
node.update_from(new_node, @user)
render :text => node.version.to_s, :content_type => "text/plain"
end