mirror of
https://github.com/System-End/theseus.git
synced 2026-04-19 21:05:10 +00:00
awawa
This commit is contained in:
parent
9c9afb79b5
commit
555b8e7ac3
2 changed files with 6 additions and 5 deletions
|
|
@ -4,9 +4,13 @@ class HCB::PaymentAccountsController < ApplicationController
|
|||
before_action :require_hcb_connection, except: [:index]
|
||||
before_action :set_payment_account, only: [:show]
|
||||
|
||||
rescue_from HCBV4::APIError do |e|
|
||||
event_id = Sentry.capture_exception(e, extra: { user_id: current_user.id })&.event_id
|
||||
redirect_to hcb_payment_accounts_path, alert: "Failed to load HCB organizations: #{e.message} (#{event_id})"
|
||||
end
|
||||
|
||||
def index
|
||||
@payment_accounts = current_user.hcb_payment_accounts
|
||||
@available_organizations = available_organizations
|
||||
end
|
||||
|
||||
def new
|
||||
|
|
@ -54,9 +58,6 @@ class HCB::PaymentAccountsController < ApplicationController
|
|||
current_user.hcb_oauth_connection.organizations.reject do |org|
|
||||
HCB::PaymentAccount::BLOCKED_ORGANIZATION_IDS.include?(org.id)
|
||||
end
|
||||
rescue => e
|
||||
Rails.logger.error "Failed to fetch HCB organizations: #{e.message}"
|
||||
[]
|
||||
end
|
||||
|
||||
def find_organization(org_id)
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
</header>
|
||||
<div class="p-4">
|
||||
<p class="text-gray-600 mb-4">
|
||||
You don't have admin access to any HCB organizations, or all your organizations are already linked.
|
||||
You don't belong to any HCB organizations, or all your organizations are already linked.
|
||||
</p>
|
||||
<%= link_to "← Back", hcb_payment_accounts_path, class: "btn btn-small" %>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue