repair: message_error_issue

This commit is contained in:
2025-11-14 18:32:24 +07:00
parent b8dd4a61f8
commit ac68a380dd
2 changed files with 52 additions and 53 deletions

View File

@@ -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));
}
}