Merge branch 'testeA'

pull/1/head
adriano 2022-02-14 08:06:41 -03:00
commit 61ec495a45
1 changed files with 3 additions and 3 deletions

View File

@ -119,6 +119,8 @@ export const remove = async (
const { whatsappId } = req.params; const { whatsappId } = req.params;
await DeleteWhatsAppService(whatsappId); await DeleteWhatsAppService(whatsappId);
removeDir(path.join(process.cwd(),'WWebJS', `session-bd_${whatsappId}`))
removeWbot(+whatsappId); removeWbot(+whatsappId);
@ -128,9 +130,7 @@ export const remove = async (
io.emit("whatsapp", { io.emit("whatsapp", {
action: "delete", action: "delete",
whatsappId: +whatsappId whatsappId: +whatsappId
}); });
removeDir(path.join(process.cwd(),'WWebJS', `session-bd_${whatsappId}`))
return res.status(200).json({ message: "Whatsapp deleted." }); return res.status(200).json({ message: "Whatsapp deleted." });
}; };