From 995bfa91ff353e60db66139fc566d88435d3723e Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 29 May 2024 14:50:48 +0100 Subject: [PATCH] Remove duplicate database status checks These are already done as part of the api checks --- app/controllers/api/traces_controller.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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 -- 2.39.5