- 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!
-
- render :nothing => true
- else
- render :nothing => true, :status => :bad_request
- end
+ if new_node and new_node.id == node.id
+ node.update_from(new_node, @user)
+ render :text => node.version.to_s, :content_type => "text/plain"