X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/0fd29dc003000f8ee22d6310e5fc4ebdbeebbb28..5400a938a86c83b668566d7fa4880403c99fc503:/app/controllers/node_controller.rb?ds=sidebyside diff --git a/app/controllers/node_controller.rb b/app/controllers/node_controller.rb index fa15171cb..d3f1ce7f6 100644 --- a/app/controllers/node_controller.rb +++ b/app/controllers/node_controller.rb @@ -42,23 +42,19 @@ class NodeController < ApplicationController def update begin node = Node.find(params[:id]) + new_node = Node.from_xml(request.raw_post) - if node.visible - new_node = Node.from_xml(request.raw_post) - - if new_node and new_node.id == node.id - node.user_id = @user.id - node.latitude = new_node.latitude - node.longitude = new_node.longitude - node.tags = new_node.tags - node.save_with_history! + if new_node and new_node.id == node.id + node.user_id = @user.id + node.latitude = new_node.latitude + node.longitude = new_node.longitude + node.tags = new_node.tags + node.visible = true + node.save_with_history! - render :nothing => true - else - render :nothing => true, :status => :bad_request - end + render :nothing => true else - render :text => "", :status => :gone + render :nothing => true, :status => :bad_request end rescue ActiveRecord::RecordNotFound render :nothing => true, :status => :not_found