From 395cc5db77dc677ac4d622e2bec69aaa5428c1b5 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Mon, 12 May 2025 11:38:51 -0700 Subject: [PATCH] Add missing string getter --- server/controllers/monitorController.js | 20 +++++++++++--------- server/locales/en.json | 4 ++-- server/service/stringService.js | 4 ++++ 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/server/controllers/monitorController.js b/server/controllers/monitorController.js index 53abc7dff..d537e8cee 100755 --- a/server/controllers/monitorController.js +++ b/server/controllers/monitorController.js @@ -582,16 +582,18 @@ class MonitorController { } try { - const monitor = await Monitor.findOneAndUpdate({ _id: req.params.monitorId }, [ - { - $set: { - isActive: { $not: "$isActive" }, - status: "$$REMOVE", + const monitor = await Monitor.findOneAndUpdate( + { _id: req.params.monitorId }, + [ + { + $set: { + isActive: { $not: "$isActive" }, + status: "$$REMOVE", + }, }, - }, - ], - { new: true } - ); + ], + { new: true } + ); monitor.isActive === true ? await this.jobQueue.deleteJob(monitor) : await this.jobQueue.addJob(monitor._id, monitor); diff --git a/server/locales/en.json b/server/locales/en.json index 6cd956c37..a693c6eef 100755 --- a/server/locales/en.json +++ b/server/locales/en.json @@ -158,8 +158,8 @@ "platformRequired": "Platform is required", "testNotificationFailed": "Failed to send test notification", "monitorUpAlert": "Uptime Alert: One of your monitors is back online.\nšŸ“Œ Monitor: {monitorName}\nšŸ“… Time: {time}\nāš ļø Status: UP\nšŸ“Ÿ Status Code: {code}\n\u200B\n", - "monitorDownAlert": "Downtime Alert: One of your monitors went offline.\nšŸ“Œ Monitor: {monitorName}\nšŸ“… Time: {time}\nāš ļø Status: DOWN\nšŸ“Ÿ Status Code: {code}\n\u200B\n", + "monitorDownAlert": "Downtime Alert: One of your monitors went offline.\nšŸ“Œ Monitor: {monitorName}\nšŸ“… Time: {time}\nāš ļø Status: DOWN\nšŸ“Ÿ Status Code: {code}\n\u200B\n", "sendTestEmail": "Test email sent successfully", "errorForValidEmailAddress": "A valid recipient email address is required.", - "testEmailSubject": "Test Email from Monitoring System" + "testEmailSubject": "Test E-mail from Checkmate" } diff --git a/server/service/stringService.js b/server/service/stringService.js index ef99eb82b..b02254255 100755 --- a/server/service/stringService.js +++ b/server/service/stringService.js @@ -428,6 +428,10 @@ class StringService { get dbUserExists() { return this.translationService.getTranslation("dbUserExists"); } + + get testEmailSubject() { + return this.translationService.getTranslation("testEmailSubject"); + } } export default StringService;