- if Segment.find(:first, :conditions => [ "visible = 1 and (node_a = ? or node_b = ?)", node.id, node.id])
- render :nothing => true, :status => HTTP_PRECONDITION_FAILED
+ 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
+
+ if node.save_with_history
+ render :nothing => true
+ else
+ render :nothing => true, :status => :internal_server_error
+ end