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