Merge branch 'master' into feature/donations_btcpay
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
2024-03-03 12:50:16 +01:00
13 changed files with 89 additions and 68 deletions

View File

@@ -1,8 +1,8 @@
class Admin::Settings::RegistrationsController < Admin::SettingsController
def index
def show
end
def create
def update
update_settings
redirect_to admin_settings_registrations_path, flash: {

View File

@@ -1,19 +1,32 @@
class Admin::Settings::ServicesController < Admin::SettingsController
def index
@service = params[:s]
before_action :set_service, only: [:show, :update]
if @service.blank?
redirect_to admin_settings_services_path(params: { s: "btcpay" })
end
def index
redirect_to admin_settings_service_path("btcpay")
end
def create
service = params.require(:service)
def show
end
def update
update_settings
redirect_to admin_settings_services_path(params: { s: service }), flash: {
redirect_to admin_settings_service_path(@service), flash: {
success: "Settings saved"
}
end
private
def set_subsection
@subsection = "services"
end
def set_service
@service = params[:service]
if @service.blank?
redirect_to admin_settings_services_path and return
end
end
end

View File

@@ -20,7 +20,7 @@ class Admin::SettingsController < Admin::BaseController
end
if @errors.any?
render :index and return
render :show and return
end
changed_keys.each do |key|