repair: message_error_issue
This commit is contained in:
@@ -10,7 +10,7 @@ class NotificationController {
|
||||
const response = await setResponsePaging(queryParams, results, 'Notification list retrieved successfully');
|
||||
return res.status(response.statusCode).json(response);
|
||||
} catch (err) {
|
||||
console.error("❌ [getAll] Notification Error:", err.message);
|
||||
console.error("Notification Error:", err.message);
|
||||
return res.status(500).json(setResponse(err, 'Failed to fetch notifications', 500));
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,7 @@ class NotificationController {
|
||||
const response = await setResponse(results, 'Notification retrieved successfully');
|
||||
return res.status(response.statusCode).json(response);
|
||||
} catch (err) {
|
||||
console.error("❌ [getById] Notification Error:", err.message);
|
||||
console.error(" Notification Error:", err.message);
|
||||
return res.status(500).json(setResponse(err, 'Failed to fetch notification', 500));
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,7 @@ class NotificationController {
|
||||
const response = await setResponse(results, 'Notification created successfully');
|
||||
return res.status(response.statusCode).json(response);
|
||||
} catch (err) {
|
||||
console.error("❌ [create] Notification Error:", err.message);
|
||||
console.error("Notification Error:", err.message);
|
||||
return res.status(500).json(setResponse(err, 'Failed to create notification', 500));
|
||||
}
|
||||
}
|
||||
@@ -62,7 +62,7 @@ class NotificationController {
|
||||
const response = await setResponse(results, 'Notification updated successfully');
|
||||
return res.status(response.statusCode).json(response);
|
||||
} catch (err) {
|
||||
console.error("❌ [update] Notification Error:", err.message);
|
||||
console.error("Notification Error:", err.message);
|
||||
return res.status(500).json(setResponse(err, 'Failed to update notification', 500));
|
||||
}
|
||||
}
|
||||
@@ -74,7 +74,7 @@ class NotificationController {
|
||||
const response = await setResponse(results, 'Notification deleted successfully');
|
||||
return res.status(response.statusCode).json(response);
|
||||
} catch (err) {
|
||||
console.error("❌ [delete] Notification Error:", err.message);
|
||||
console.error("Notification Error:", err.message);
|
||||
return res.status(500).json(setResponse(err, 'Failed to delete notification', 500));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user