feat(gowa): tombol Test Koneksi (health, auth, jumlah device)
All checks were successful
CI / test (push) Successful in 2m44s
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user