X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/363155a2a86796d27ee9161f1ee9b74d6fa307e5..0db30c611a99d62381217d86c5a0bd9d104efb42:/app/controllers/api/nodes_controller.rb diff --git a/app/controllers/api/nodes_controller.rb b/app/controllers/api/nodes_controller.rb index 630149a74..2962ce070 100644 --- a/app/controllers/api/nodes_controller.rb +++ b/app/controllers/api/nodes_controller.rb @@ -26,17 +26,13 @@ module Api # Dump the details on a node given in params[:id] def show - node = Node.find(params[:id]) - - response.last_modified = node.timestamp + @node = Node.find(params[:id]) - if node.visible - @nodes = [node] + response.last_modified = @node.timestamp + if @node.visible # Render the result - respond_to do |format| - format.xml - end + render :formats => [:xml] else head :gone end @@ -77,9 +73,7 @@ module Api @nodes = Node.find(ids) # Render the result - respond_to do |format| - format.xml - end + render :formats => [:xml] end end end