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.
This commit is contained in:
Davidson Gomes 2025-06-12 17:32:00 -03:00
parent a02ecc88f5
commit bcf2febf48

View File

@ -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<WaBusiness>('WA_BUSINESS').URL}/${