Adicionado o metodo removeDir ante de remover o wbot
parent
de4877b31f
commit
4ccb5c5591
|
@ -119,6 +119,8 @@ export const remove = async (
|
|||
const { whatsappId } = req.params;
|
||||
|
||||
await DeleteWhatsAppService(whatsappId);
|
||||
|
||||
removeDir(path.join(process.cwd(),'WWebJS', `session-bd_${whatsappId}`))
|
||||
|
||||
removeWbot(+whatsappId);
|
||||
|
||||
|
@ -128,9 +130,7 @@ export const remove = async (
|
|||
io.emit("whatsapp", {
|
||||
action: "delete",
|
||||
whatsappId: +whatsappId
|
||||
});
|
||||
|
||||
removeDir(path.join(process.cwd(),'WWebJS', `session-bd_${whatsappId}`))
|
||||
});
|
||||
|
||||
return res.status(200).json({ message: "Whatsapp deleted." });
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue