feat: enhance notification and reminder services with logging and time tracking
This commit is contained in:
@@ -31,6 +31,7 @@ const {
|
||||
} = require("../db/notification_wa.db");
|
||||
|
||||
const { ErrorHandler } = require("../helpers/error");
|
||||
const { deleteReminder } = require("./notifikasi-wa.service");
|
||||
|
||||
class NotificationService {
|
||||
static async getAllNotification(param) {
|
||||
@@ -150,6 +151,8 @@ class NotificationService {
|
||||
|
||||
const notification = Array.isArray(dataExist) ? dataExist[0] : dataExist;
|
||||
|
||||
await deleteReminder(notification_error_id)
|
||||
|
||||
if (notification.is_read === true) {
|
||||
return { success: true, message: "Notification has already been read" };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user