diff --git a/src/api/services/channels/whatsapp.business.service.ts b/src/api/services/channels/whatsapp.business.service.ts index 2ff8caf0e..f0343ee9f 100644 --- a/src/api/services/channels/whatsapp.business.service.ts +++ b/src/api/services/channels/whatsapp.business.service.ts @@ -602,6 +602,8 @@ export class BusinessStartupService extends ChannelStartupService { documentMessage: message, }; } + + return message; } protected async eventHandler(content: any) { diff --git a/src/api/services/template.service.ts b/src/api/services/template.service.ts index 13a436f35..f5c73f527 100644 --- a/src/api/services/template.service.ts +++ b/src/api/services/template.service.ts @@ -36,8 +36,6 @@ export class TemplateService { throw new Error('Error to create template'); } - console.log(response); - return response.data; } @@ -66,8 +64,6 @@ export class TemplateService { throw new Error('Error to create template'); } - console.log(response); - const template = await this.prismaRepository.template.create({ data: { instanceId: getInstance.id, @@ -96,6 +92,9 @@ export class TemplateService { } else if (method === 'POST') { const result = await axios.post(urlServer, data, { headers }); return result.data; + } else if (method === 'DELETE') { + const result = await axios.delete(urlServer + '/' + data, { headers }); + return result.data; } } catch (e) { this.logger.error(e.response.data);