feat(inboxes): add inbox disable toggle

This commit is contained in:
Muhsin
2026-06-09 21:07:05 +04:00
parent 8a3b129292
commit cbd24dbdb2
49 changed files with 239 additions and 19 deletions
+5
View File
@@ -5,6 +5,7 @@ class WidgetsController < ActionController::Base
before_action :set_global_config
before_action :set_web_widget
before_action :ensure_account_is_active
before_action :ensure_inbox_active
before_action :ensure_location_is_supported
before_action :set_token
before_action :set_contact
@@ -62,6 +63,10 @@ class WidgetsController < ActionController::Base
render json: { error: 'Account is suspended' }, status: :unauthorized unless @web_widget.inbox.account.active?
end
def ensure_inbox_active
head :not_found unless @web_widget.inbox.active?
end
def ensure_location_is_supported; end
def additional_attributes