X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/363155a2a86796d27ee9161f1ee9b74d6fa307e5..6a77bbe544b9866844473230b0c2406062ab9b5b:/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