add: api is read & not read in notification
This commit is contained in:
@@ -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 = {};
|
||||
|
||||
Reference in New Issue
Block a user