From 49a7921ec88548a0b68697d03869365eacaa8cb8 Mon Sep 17 00:00:00 2001 From: Han Chao Date: Sun, 5 Mar 2017 10:37:25 +0000 Subject: [PATCH] Use local api to export map.osm Closes #1282 --- app/controllers/export_controller.rb | 2 +- test/controllers/export_controller_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/export_controller.rb b/app/controllers/export_controller.rb index 6e5016ddc..1b7beaad6 100644 --- a/app/controllers/export_controller.rb +++ b/app/controllers/export_controller.rb @@ -12,7 +12,7 @@ class ExportController < ApplicationController if format == "osm" # redirect to API map get - redirect_to "http://api.openstreetmap.org/api/#{API_VERSION}/map?bbox=#{bbox}" + redirect_to :controller => "api", :action => "map", :bbox => bbox elsif format == "mapnik" # redirect to a special 'export' cgi script diff --git a/test/controllers/export_controller_test.rb b/test/controllers/export_controller_test.rb index adf2fc4ba..9d1c69e4d 100644 --- a/test/controllers/export_controller_test.rb +++ b/test/controllers/export_controller_test.rb @@ -19,7 +19,7 @@ class ExportControllerTest < ActionController::TestCase def test_finish_osm get :finish, :minlon => 0, :minlat => 50, :maxlon => 1, :maxlat => 51, :format => "osm" assert_response :redirect - assert_redirected_to "http://api.openstreetmap.org/api/#{API_VERSION}/map?bbox=0.0,50.0,1.0,51.0" + assert_redirected_to "controller" => "api", "action" => "map", "bbox" => "0.0,50.0,1.0,51.0" end ### -- 2.39.5