X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/19c2f6d485baf6ae5986a9eeaed412cb2e2039a1..951564eed1c82ec1a435f4e4636db86d1b7604fc:/app/controllers/application_controller.rb diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 5fc31adb8..3ab09b63d 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -95,14 +95,14 @@ class ApplicationController < ActionController::Base end def check_api_readable - if api_status == :offline + if api_status == "offline" report_error "Database offline for maintenance", :service_unavailable false end end def check_api_writable - unless api_status == :online + unless api_status == "online" report_error "Database offline for maintenance", :service_unavailable false end @@ -110,21 +110,21 @@ class ApplicationController < ActionController::Base def database_status if Settings.status == "database_offline" - :offline + "offline" elsif Settings.status == "database_readonly" - :readonly + "readonly" else - :online + "online" end end def api_status status = database_status - if status == :online + if status == "online" if Settings.status == "api_offline" - status = :offline + status = "offline" elsif Settings.status == "api_readonly" - status = :readonly + status = "readonly" end end status