From 1bc18fbbaff18df6d5f68ce67ed92a87d3dae130 Mon Sep 17 00:00:00 2001 From: cangui Date: Tue, 6 May 2025 21:16:39 +0200 Subject: [PATCH] KKKK --- index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index cd9fbcc..bcd872e 100644 --- a/index.js +++ b/index.js @@ -71,9 +71,8 @@ app.post('/sendText', async (req, res) => { app.post('/sendButtons', async (req, res) => { const { phone } = req.body; - if (!client || !isConnected) { - return res.status(400).json({ error: 'Non connecté' }); - } + if (!sock || !isConnected) return res.status(400).json({ error: 'Non connecté' }); + const BASE_URL = process.env.BASE_URL || 'https://wa.canguidev.fr'; const imageUrl = `${BASE_URL}/static/logo-merlo-cs-FR.jpg`;