fix: reminder monthly, and cron in reminder reminder monthly

This commit is contained in:
2026-06-24 19:33:23 +07:00
parent 8fd317083b
commit 55aa2f05c6
4 changed files with 353 additions and 137 deletions

View File

@@ -11,10 +11,11 @@ router.post('/restart-wa', async (req, res) => {
}
});
router.post('/reminder-sparepart/:id', async (req, res) => {
router.post('/reminder-monthly/:id', async (req, res) => {
try {
const { id } = req.params;
const result = await NotifikasiWaService.onMonthlyReminder(id);
const {reminder_at_monthly} = req.body
const result = await NotifikasiWaService.onMonthlyReminder(id, reminder_at_monthly);
return res.status(200).json(result);
} catch (error) {
return res.status(500).json(error);