]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/api/tracepoints_controller.rb
Check required bbox parameter presence outside of BoundingBox class
[rails.git] / app / controllers / api / tracepoints_controller.rb
index e8bd97b64196503f9d3279dd9e749496880cf38c..f38351de96f0884e0a69aecebbb430871ad2c231 100644 (file)
@@ -23,6 +23,8 @@ module Api
       # check boundary is sane and area within defined
       # see /config/application.yml
       begin
       # check boundary is sane and area within defined
       # see /config/application.yml
       begin
+        raise OSM::APIBadUserInput, "The parameter bbox is required" unless params[:bbox]
+
         bbox = BoundingBox.from_bbox_params(params)
         bbox.check_boundaries
         bbox.check_size
         bbox = BoundingBox.from_bbox_params(params)
         bbox.check_boundaries
         bbox.check_size