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
Build and Deploy (Gitea) / build-and-deploy (push) Successful in 59s
Details
This commit is contained in:
parent
1b98a72b1a
commit
eda76c8914
|
|
@ -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({
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue