mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-23 04:22:02 -06:00
fix: Correção no retorno dos envios na API oficial do WhatsApp
Correção no serviço WhatsApp Business para retornar a mensagem após o envio. Além disso, foi adicionada a capacidade de deletar templates por ID. Arquivos modificados: - whatsapp.business.service.ts - template.service.ts
This commit is contained in:
parent
26bddf3c53
commit
99a091ec61
@ -602,6 +602,8 @@ export class BusinessStartupService extends ChannelStartupService {
|
||||
documentMessage: message,
|
||||
};
|
||||
}
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
protected async eventHandler(content: any) {
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user