fix: reminder monthly in db device
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user