Used string service instead of hardcoded value.

This commit is contained in:
Skorpios committed 2025-02-17 17:33:54 -08:00
1 parent 5be17af4c1
commit 4ef2b294bb
1 file changed
+6 -6
+6 -6
View File
@@ -22,17 +22,17 @@ class NotificationController {
next(handleValidationError(error, SERVICE_NAME)); next(handleValidationError(error, SERVICE_NAME));
return; return;
} }
try { try {
const { monitorId, type, platform, config } = req.body; const { monitorId, type, platform, config } = req.body;
const networkResponse = { const networkResponse = {
monitor: { _id: monitorId, name: "Test Monitor", url: "http://www.google.com" }, monitor: { _id: monitorId, name: "Test Monitor", url: "http://www.google.com" },
status: false, status: false,
statusChanged: true, statusChanged: true,
prevStatus: true, prevStatus: true,
}; };
if (type === "webhook") { if (type === "webhook") {
const notification = { const notification = {
type, type,
@@ -45,11 +45,11 @@ class NotificationController {
notification notification
); );
} }
return res.success({ return res.success({
msg: "Notification sent successfully" msg: this.stringService.webhookSendSuccess
}); });
} catch (error) { } catch (error) {
next(handleError(error, SERVICE_NAME, "triggerNotification")); next(handleError(error, SERVICE_NAME, "triggerNotification"));
} }