From: Andy Allan Date: Wed, 29 May 2024 13:50:48 +0000 (+0100) Subject: Remove duplicate database status checks X-Git-Tag: live~425^2~3 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/995bfa91ff353e60db66139fc566d88435d3723e Remove duplicate database status checks These are already done as part of the api checks --- diff --git a/app/controllers/api/traces_controller.rb b/app/controllers/api/traces_controller.rb index 956bcde6e..d9b5bce25 100644 --- a/app/controllers/api/traces_controller.rb +++ b/app/controllers/api/traces_controller.rb @@ -1,14 +1,12 @@ module Api class TracesController < ApiController - before_action :check_database_readable, :except => [:show, :data] - 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 :set_locale before_action :authorize authorize_resource - before_action :check_api_readable, :only => [:show, :data] - before_action :check_api_writable, :only => [:create, :update, :destroy] before_action :offline_error, :only => [:create, :destroy, :data] around_action :api_call_handle_error