From bcf2febf48be8aa509c3aa733ec61ac25b3658d7 Mon Sep 17 00:00:00 2001 From: Davidson Gomes Date: Thu, 12 Jun 2025 17:32:00 -0300 Subject: [PATCH] refactor(whatsapp.business.service): replace hardcoded token with class property - Updated the token retrieval in the BusinessStartupService to use a class property instead of a hardcoded environment variable. - This change enhances flexibility and maintainability of the service configuration. --- src/api/integrations/channel/meta/whatsapp.business.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/integrations/channel/meta/whatsapp.business.service.ts b/src/api/integrations/channel/meta/whatsapp.business.service.ts index ce067f83..56533ff9 100644 --- a/src/api/integrations/channel/meta/whatsapp.business.service.ts +++ b/src/api/integrations/channel/meta/whatsapp.business.service.ts @@ -1195,7 +1195,7 @@ export class BusinessStartupService extends ChannelStartupService { formData.append('typeFile', mimetype); formData.append('messaging_product', 'whatsapp'); - const token = process.env.FACEBOOK_USER_TOKEN; + const token = this.token; const headers = { Authorization: `Bearer ${token}` }; const url = `${this.configService.get('WA_BUSINESS').URL}/${