repair: resend chat all user & by user
This commit is contained in:
@@ -71,6 +71,24 @@ class NotificationErrorController {
|
||||
|
||||
res.status(response.statusCode).json(response);
|
||||
}
|
||||
|
||||
static async resend(req, res) {
|
||||
try {
|
||||
const { id } = req.params;
|
||||
|
||||
const results = await NotificationErrorService.resendNotification(id);
|
||||
|
||||
const response = await setResponse(
|
||||
results,
|
||||
results.message,
|
||||
);
|
||||
|
||||
res.status(response.statusCode).json(response);
|
||||
} catch (error) {
|
||||
const response = setResponse(null, error.message, error.statusCode || 500);
|
||||
res.status(response.statusCode).json(response);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = NotificationErrorController;
|
||||
|
||||
@@ -67,14 +67,14 @@ class NotificationErrorUserController {
|
||||
res.status(response.statusCode).json(response);
|
||||
}
|
||||
|
||||
static async resend(req, res) {
|
||||
static async resendByUser(req, res) {
|
||||
try {
|
||||
const { id, contact_phone } = req.params;
|
||||
|
||||
const results = await NotificationErrorUserService.resendNotification(id, contact_phone);
|
||||
const results = await NotificationErrorUserService.resendNotificationByUser(id, contact_phone)
|
||||
|
||||
const response = await setResponse(
|
||||
results.data,
|
||||
results,
|
||||
results.message,
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user