Update whatsapp logout endpoint to completely delete the instance session state for cleaner reconnects
Build and Deploy (Gitea) / build-and-deploy (push) Successful in 59s Details

This commit is contained in:
Sidney Gomes 2026-07-23 22:32:52 -03:00
parent 1b98a72b1a
commit eda76c8914
1 changed files with 2 additions and 2 deletions

View File

@ -1317,9 +1317,9 @@ app.post('/api/admin/whatsapp/logout', authenticateToken, requireAdmin, async (r
const apiKey = settings.evolutionApiKey; const apiKey = settings.evolutionApiKey;
try { try {
await axios.delete(`${apiUrl}/instance/logout/${instance}`, { headers: { apikey: apiKey } }); await axios.delete(`${apiUrl}/instance/delete/${instance}`, { headers: { apikey: apiKey } });
} catch (err: any) { } catch (err: any) {
// ignore 404 or others during logout // ignore errors during delete
} }
await prisma.systemSettings.update({ await prisma.systemSettings.update({