From 554a33b1c52b3db5d9874cbd5209e574d6901f3c Mon Sep 17 00:00:00 2001 From: Blue-Gamer48 <97996264+Blue-Gamer48@users.noreply.github.com> Date: Sun, 17 Sep 2023 11:38:47 +0200 Subject: [PATCH 1/2] Add files via upload --- server/notification-providers/discord.js | 26 ++++++++++-------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/server/notification-providers/discord.js b/server/notification-providers/discord.js index f24cd6169c..beaa1548c2 100644 --- a/server/notification-providers/discord.js +++ b/server/notification-providers/discord.js @@ -6,9 +6,6 @@ class Discord extends NotificationProvider { name = "discord"; - /** - * @inheritdoc - */ async send(notification, msg, monitorJSON = null, heartbeatJSON = null) { let okMsg = "Sent Successfully."; @@ -33,7 +30,6 @@ class Discord extends NotificationProvider { break; case "port": case "dns": - case "gamedig": case "steam": address = monitorJSON["hostname"]; if (monitorJSON["port"]) { @@ -50,24 +46,24 @@ class Discord extends NotificationProvider { let discorddowndata = { username: discordDisplayName, embeds: [{ - title: "❌ Your service " + monitorJSON["name"] + " went down. ❌", + title: "❌ Der Dienst " + monitorJSON["name"] + " ist Offline. ❌", color: 16711680, timestamp: heartbeatJSON["time"], fields: [ { - name: "Service Name", + name: "Dienstname", value: monitorJSON["name"], }, { - name: monitorJSON["type"] === "push" ? "Service Type" : "Service URL", + name: monitorJSON["type"] === "push" ? "Service Type" : "Dienstadresse", value: monitorJSON["type"] === "push" ? "Heartbeat" : address, }, { - name: `Time (${heartbeatJSON["timezone"]})`, - value: heartbeatJSON["localDateTime"], + name: "Datum und Uhrzeit (UTC)", + value: heartbeatJSON["time"], }, { - name: "Error", + name: "Fehler", value: heartbeatJSON["msg"] == null ? "N/A" : heartbeatJSON["msg"], }, ], @@ -85,21 +81,21 @@ class Discord extends NotificationProvider { let discordupdata = { username: discordDisplayName, embeds: [{ - title: "✅ Your service " + monitorJSON["name"] + " is up! ✅", + title: "✅ Der Dienst " + monitorJSON["name"] + " ist Online! ✅", color: 65280, timestamp: heartbeatJSON["time"], fields: [ { - name: "Service Name", + name: "Dienstname", value: monitorJSON["name"], }, { - name: monitorJSON["type"] === "push" ? "Service Type" : "Service URL", + name: monitorJSON["type"] === "push" ? "Service Type" : "Dienstadresse", value: monitorJSON["type"] === "push" ? "Heartbeat" : address, }, { - name: `Time (${heartbeatJSON["timezone"]})`, - value: heartbeatJSON["localDateTime"], + name: "Datum und Uhrzeit (UTC)", + value: heartbeatJSON["time"], }, { name: "Ping", From 01467b40f1f481bd78723a8ab6d0541d3299f889 Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Fri, 5 Jan 2024 14:41:40 +0000 Subject: [PATCH 2/2] fix: package.json to reduce vulnerabilities The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-AXIOS-6144788 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4814da6a7a..2a04be2407 100644 --- a/package.json +++ b/package.json @@ -78,8 +78,8 @@ "@louislam/ping": "~0.4.4-mod.1", "@louislam/sqlite3": "15.1.6", "args-parser": "~1.3.0", - "axios": "~0.27.0", - "axios-ntlm": "1.3.0", + "axios": "~1.6.4", + "axios-ntlm": "1.3.1", "badge-maker": "~3.3.1", "bcryptjs": "~2.4.3", "cacheable-lookup": "~6.0.4",