fix: reminder monthly in db device

This commit is contained in:
2026-07-08 11:47:11 +07:00
parent 1c56239fc8
commit a52efeceb5
2 changed files with 4 additions and 5 deletions

View File

@@ -155,15 +155,14 @@ const getDeviceReminderMonthlyDb = async (id) => {
return result.recordset;
};
const updateDeviceReminderMonthlyDb = async (deviceId, reminderMonthly, period) => {
const updateDeviceReminderMonthlyDb = async (deviceId, reminderMonthly) => {
const queryText = `
UPDATE m_device
SET reminder_at_monthly = $1,
period = $2
updated_at = CURRENT_TIMESTAMP
WHERE device_id = $2 AND deleted_at IS NULL
`;
await pool.query(queryText, [reminderMonthly, deviceId, period]);
await pool.query(queryText, [reminderMonthly, deviceId]);
return getDeviceByIdDb(deviceId);
};