]> 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 c71b5a3e9a06d7e6c5e7e1d3fea08282ae4db29f..f7b812f7c6be5d6d86d842e6dfaf50c8e96a7fd9 100644 (file)
@@ -1,8 +1,5 @@
 module Api
-  class TracepointsController < ApplicationController
-    skip_before_action :verify_authenticity_token
-    before_action :api_deny_access_handler
-
+  class TracepointsController < ApiController
     authorize_resource
 
     before_action :check_api_readable
@@ -28,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
 
@@ -101,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\""