Files
chatwoot/app/views/api/v1/models/_hook.json.jbuilder

10 lines
385 B
Ruby

json.id resource.id
json.app_id resource.app_id
json.status resource.enabled?
json.inbox resource.inbox&.slice(:id, :name)
json.account_id resource.account_id
json.hook_type resource.hook_type
json.settings resource.settings if Current.account_user&.administrator? && @access_token&.scope != 'read_only'
json.reference_id resource.reference_id if Current.account_user&.administrator?