X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/d8a1cbd27bcaeba879662f26f91efd0e76bb1f1f..2def62ee19b2b7e6fa7ede5a486a7b12abf9529d:/app/controllers/api/traces_controller.rb diff --git a/app/controllers/api/traces_controller.rb b/app/controllers/api/traces_controller.rb index 8979704a7..000bb7f90 100644 --- a/app/controllers/api/traces_controller.rb +++ b/app/controllers/api/traces_controller.rb @@ -12,7 +12,7 @@ module Api before_action :check_database_writable, :only => [:create, :update, :destroy] before_action :check_api_readable, :only => [:show, :data] before_action :check_api_writable, :only => [:create, :update, :destroy] - before_action :offline_redirect, :only => [:create, :destroy, :data] + before_action :offline_error, :only => [:create, :destroy, :data] around_action :api_call_handle_error def show @@ -158,8 +158,8 @@ module Api trace end - def offline_redirect - redirect_to :action => :offline if Settings.status == "gpx_offline" + def offline_error + report_error "GPX files offline for maintenance", :service_unavailable end end end