Files
cod-api/routes/notifikasi-wa.route.js
2026-06-05 09:17:45 +07:00

24 lines
686 B
JavaScript

const express = require('express');
const router = express.Router();
const NotifikasiWaService = require('../services/notifikasi-wa.service');
router.post('/restart-wa', async (req, res) => {
try {
const result = await NotifikasiWaService.restartWhatsapp();
return res.status(200).json(result);
} catch (error) {
return res.status(500).json(error);
}
});
router.post('/reminder-sparepart/:id', async (req, res) => {
try {
const { id } = req.params;
const result = await NotifikasiWaService.onMonthlySparepartReminder(id);
return res.status(200).json(result);
} catch (error) {
return res.status(500).json(error);
}
});
module.exports = router;