add: api is read & not read in notification

This commit is contained in:
2025-12-18 12:43:44 +07:00
parent 1aa7b1bc08
commit dd5e1cc713
5 changed files with 253 additions and 7 deletions

View File

@@ -1,5 +1,7 @@
const {
getAllNotificationDb,
getAllNotificationIsReadDb,
getAllNotificationIsNotReadDb,
getNotificationByIdDb,
InsertNotificationErrorDb,
getReaderNotificationErrorDb,
@@ -43,6 +45,32 @@ class NotificationService {
}
}
static async getAllNotificationIsRead(param) {
try {
const results = await getAllNotificationIsReadDb(param);
results.data.map(element => {
});
return results;
} catch (error) {
throw new ErrorHandler(error.statusCode, error.message);
}
}
static async getAllNotificationIsNotRead(param) {
try {
const results = await getAllNotificationIsNotReadDb(param);
results.data.map(element => {
});
return results;
} catch (error) {
throw new ErrorHandler(error.statusCode, error.message);
}
}
static async createNotificationError(data) {
try {
if (!data || typeof data !== 'object') data = {};