feat(gowa): tombol Test Koneksi (health, auth, jumlah device)
All checks were successful
CI / test (push) Successful in 2m44s

- service testReachability: /health + /devices
- route POST /admin/whatsapp/test-gowa-connection
- UI status warna hijau/kuning/merah
- versi 0.5.11
This commit is contained in:
oxpoe
2026-11-05 17:01:13 +07:00
parent b49822b553
commit f8e6e86619
7 changed files with 75 additions and 4 deletions

View File

@@ -6770,6 +6770,16 @@ router.post('/whatsapp/gateway-settings', requireAdminSession, express.urlencode
res.redirect('/admin/whatsapp');
});
router.post('/whatsapp/test-gowa-connection', requireAdminSession, async (req, res) => {
try {
const gowaSvc = require('../services/gowaWhatsappService');
const r = await gowaSvc.testReachability();
return res.json(Object.assign({ ok: r.reachable, success: r.reachable }, r));
} catch (e) {
return res.status(500).json({ ok: false, success: false, message: e.message });
}
});
router.post('/whatsapp/test-gowa', requireAdminSession, express.json(), async (req, res) => {
try {
const { phone, message } = req.body;