repair: change error update is_read true to success
This commit is contained in:
@@ -150,9 +150,10 @@ class NotificationService {
|
|||||||
const notification = Array.isArray(dataExist) ? dataExist[0] : dataExist;
|
const notification = Array.isArray(dataExist) ? dataExist[0] : dataExist;
|
||||||
|
|
||||||
if (notification.is_read === true) {
|
if (notification.is_read === true) {
|
||||||
throw new ErrorHandler(400, "Notification has already been read");
|
return {success: true, message:"Notification has already been read"};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!notification.is_read) {
|
if (!notification.is_read) {
|
||||||
const updateStatus = await updateNotificationErrorDb(
|
const updateStatus = await updateNotificationErrorDb(
|
||||||
notification_error_id,
|
notification_error_id,
|
||||||
|
|||||||
Reference in New Issue
Block a user