X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/a1a5706203b80f819be25d1563008ecd3039fe6c..34e3e51456774127d43408b7ab65c24f41373f62:/app/controllers/node_controller.rb diff --git a/app/controllers/node_controller.rb b/app/controllers/node_controller.rb index 1e34bc10d..597aa4a44 100644 --- a/app/controllers/node_controller.rb +++ b/app/controllers/node_controller.rb @@ -35,12 +35,12 @@ class NodeController < ApplicationController render :text => "", :status => :gone end end - + # Update a node from given XML def update node = Node.find(params[:id]) new_node = Node.from_xml(request.raw_post) - + unless new_node and new_node.id == node.id raise OSM::APIBadUserInput.new("The id in the url (#{node.id}) is not the same as provided in the xml (#{new_node.id})") end @@ -48,13 +48,13 @@ class NodeController < ApplicationController render :text => node.version.to_s, :content_type => "text/plain" end - # Delete a node. Doesn't actually delete it, but retains its history + # 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 node = Node.find(params[:id]) new_node = Node.from_xml(request.raw_post) - + unless new_node and new_node.id == node.id raise OSM::APIBadUserInput.new("The id in the url (#{node.id}) is not the same as provided in the xml (#{new_node.id})") end