chore: Allow super admin to suspend an account (#5174)

This commit is contained in:
Pranav Raj S
2022-08-03 11:40:03 +05:30
committed by GitHub
parent 4152883f38
commit e0cebfaa1a
20 changed files with 259 additions and 23 deletions

View File

@@ -5,7 +5,9 @@ module WebsiteTokenHelper
def set_web_widget
@web_widget = ::Channel::WebWidget.find_by!(website_token: permitted_params[:website_token])
@current_account = @web_widget.account
@current_account = @web_widget.inbox.account
render json: { error: 'Account is suspended' }, status: :unauthorized unless @current_account.active?
end
def set_contact