repair: body message wa in notif
This commit is contained in:
@@ -43,6 +43,22 @@ const getNotificationByIdDb = async (id) => {
|
||||
return result.recordset[0];
|
||||
};
|
||||
|
||||
const getDeviceNotificationByIdDb = async (chanel_id) => {
|
||||
const queryText = `
|
||||
SELECT
|
||||
device_code,
|
||||
device_name,
|
||||
device_location,
|
||||
listen_channel
|
||||
|
||||
FROM m_device
|
||||
WHERE listen_channel = $1
|
||||
AND deleted_at IS NULL
|
||||
`;
|
||||
const result = await pool.query(queryText, [chanel_id]);
|
||||
return result.recordset[0];
|
||||
};
|
||||
|
||||
|
||||
const getAllNotificationDb = async (searchParams = {}) => {
|
||||
let queryParams = [];
|
||||
@@ -185,6 +201,7 @@ const getUsersNotificationErrorDb = async (id) => {
|
||||
|
||||
module.exports = {
|
||||
getNotificationByIdDb,
|
||||
getDeviceNotificationByIdDb,
|
||||
getAllNotificationDb,
|
||||
InsertNotificationErrorDb,
|
||||
updateNotificationErrorDb,
|
||||
|
||||
Reference in New Issue
Block a user