fix: reminder route

This commit is contained in:
2026-07-08 12:56:08 +07:00
parent b4fe71ccc6
commit 13ce1705fa

View File

@@ -14,10 +14,10 @@ router.post('/restart-wa', async (req, res) => {
}
});
router.post('/reminder-monthly/:id',verifyToken, verifyAccess, async (req, res) => {
router.post('/reminder-monthly/:id', verifyToken.verifyAccessToken, verifyAccess(), async (req, res) => {
try {
const { id } = req.params;
const {reminder_at_monthly} = req.body
const { reminder_at_monthly } = req.body;
const result = await NotifikasiWaService.onMonthlyReminder(id, reminder_at_monthly);
return res.status(200).json(result);
} catch (error) {
@@ -25,10 +25,10 @@ router.post('/reminder-monthly/:id',verifyToken, verifyAccess, async (req, res)
}
});
router.post('/reminder-custom/:id',verifyToken, verifyAccess, async (req, res) => {
router.post('/reminder-custom/:id', verifyToken.verifyAccessToken, verifyAccess(), async (req, res) => {
try {
const { id } = req.params;
const {start_date, end_date} = req.body;
const { start_date, end_date } = req.body;
const result = await NotifikasiWaService.onCustomReminder(id, start_date, end_date);
return res.status(200).json(result);
} catch (error) {