feat: enhance notification and reminder services with logging and time tracking

This commit is contained in:
2026-04-29 16:28:58 +07:00
parent a2a64a972f
commit 12ff3d5b21
2 changed files with 45 additions and 2 deletions

View File

@@ -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" };
}