From 4ec81962ddcb934e8a6caaebbb6d9f319ea95296 Mon Sep 17 00:00:00 2001 From: Clairton Rodrigo Heinzen Date: Sun, 6 Oct 2024 17:16:40 -0300 Subject: [PATCH] fix: wavoip token for agent --- app/javascript/dashboard/i18n/locale/en/index.js | 5 ----- app/views/api/v1/models/_inbox.json.jbuilder | 6 +++--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/app/javascript/dashboard/i18n/locale/en/index.js b/app/javascript/dashboard/i18n/locale/en/index.js index 7985e2e369170..42830cc3715a6 100644 --- a/app/javascript/dashboard/i18n/locale/en/index.js +++ b/app/javascript/dashboard/i18n/locale/en/index.js @@ -35,11 +35,6 @@ import signup from './signup.json'; import sla from './sla.json'; import teamsSettings from './teamsSettings.json'; import whatsappTemplates from './whatsappTemplates.json'; -import sla from './sla.json'; -import inbox from './inbox.json'; -import general from './general.json'; -import datePicker from './datePicker.json'; -import customRole from './customRole.json'; import webphone from './webphone.json'; export default { diff --git a/app/views/api/v1/models/_inbox.json.jbuilder b/app/views/api/v1/models/_inbox.json.jbuilder index 5b7f65a6c715a..dea7499774bd3 100644 --- a/app/views/api/v1/models/_inbox.json.jbuilder +++ b/app/views/api/v1/models/_inbox.json.jbuilder @@ -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