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

@@ -25,6 +25,36 @@ class NotificationErrorController {
res.status(response.statusCode).json(response);
}
static async getAllIsRead(req, res) {
const queryParams = req.query;
const results = await NotificationErrorService.getAllNotificationIsRead(
queryParams
);
const response = await setResponsePaging(
queryParams,
results,
"Notification found"
);
res.status(response.statusCode).json(response);
}
static async getAllIsNotRead(req, res) {
const queryParams = req.query;
const results = await NotificationErrorService.getAllNotificationIsNotRead(
queryParams
);
const response = await setResponsePaging(
queryParams,
results,
"Notification found"
);
res.status(response.statusCode).json(response);
}
static async getById(req, res) {
const { id } = req.params;