X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/cf3cf5216fa3697ad2e3c060fced6a7bbb16f4a4..0db30c611a99d62381217d86c5a0bd9d104efb42:/app/controllers/api/nodes_controller.rb diff --git a/app/controllers/api/nodes_controller.rb b/app/controllers/api/nodes_controller.rb index 891528a5f..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 - @node = 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