Skip to content

Commit

Permalink
fix: wavoip token for agent
Browse files Browse the repository at this point in the history
  • Loading branch information
clairton committed Oct 6, 2024
1 parent 9c8607b commit 1114258
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/views/api/v1/models/_inbox.json.jbuilder
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ if resource.whatsapp?
json.message_templates resource.channel.try(:message_templates)
json.provider_config resource.channel.try(:provider_config) if Current.account_user&.administrator?
unless Current.account_user&.administrator?
json.provider_config = {
wavoip_token: resource.channel.try(:provider_config).try(:wavoip_token)
}
provider_config = { wavoip_token: (resource.channel.try(:provider_config) || {})['wavoip_token'] }
puts ">>>>>>>> 1 #{provider_config}"
json.provider_config provider_config
end
end

Expand Down

0 comments on commit 1114258

Please sign in to comment.