]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/api/tracepoints_controller.rb
Merge remote-tracking branch 'upstream/pull/2921' into master
[rails.git] / app / controllers / api / tracepoints_controller.rb
index 7799de2660a88102f1d1071c99f1df20983c09f0..f7b812f7c6be5d6d86d842e6dfaf50c8e96a7fd9 100644 (file)
@@ -1,7 +1,5 @@
 module Api
   class TracepointsController < ApiController
-    before_action :api_deny_access_handler
-
     authorize_resource
 
     before_action :check_api_readable
@@ -27,8 +25,8 @@ module Api
         bbox = BoundingBox.from_bbox_params(params)
         bbox.check_boundaries
         bbox.check_size
-      rescue StandardError => err
-        report_error(err.message)
+      rescue StandardError => e
+        report_error(e.message)
         return
       end
 
@@ -100,7 +98,7 @@ module Api
           end
         end
 
-        trkseg << point.to_xml_node(timestamps)
+        trkseg << point.to_xml_node(:print_timestamp => timestamps)
       end
 
       response.headers["Content-Disposition"] = "attachment; filename=\"tracks.gpx\""