From f5e7d438d8abfebfc12c012957d5e75f245a6475 Mon Sep 17 00:00:00 2001 From: Simon Nilsson Date: Mon, 25 Mar 2024 21:49:18 +0100 Subject: [PATCH] Fixed errors --- server/model/monitor.js | 6 +++--- server/notification-providers/cellsynt.js | 2 +- src/components/notifications/Cellsynt.vue | 6 ++---- src/components/notifications/index.js | 1 - 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index 582af565..92a24e72 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -241,9 +241,9 @@ class Monitor extends BeanModel { /** * Encode user and password to Base64 encoding * for HTTP "basic" auth, as per RFC-7617 - * @param {string|null} user - The username (nullable if not changed by a user) - * @param {string|null} pass - The password (nullable if not changed by a user) - * @returns {string} + * @param {string} user Username to encode + * @param {string} pass Password to encode + * @returns {string} Encoded username:password */ encodeBase64(user, pass) { return Buffer.from(`${user || ""}:${pass || ""}`).toString("base64"); diff --git a/server/notification-providers/cellsynt.js b/server/notification-providers/cellsynt.js index 95b22876..a9235de5 100644 --- a/server/notification-providers/cellsynt.js +++ b/server/notification-providers/cellsynt.js @@ -106,7 +106,7 @@ class Cellsynt extends NotificationProvider { data.params.text = msg.replace(/[^\x00-\x7F]/g, ""); } let resp = await axios.post("https://se-1.cellsynt.net/sms.php", null, data); - if(resp.data == null || resp.data.includes("Error")) { + if (resp.data == null || resp.data.includes("Error")) { this.throwGeneralAxiosError(resp.data); } } catch (error) { diff --git a/src/components/notifications/Cellsynt.vue b/src/components/notifications/Cellsynt.vue index f00d1e37..a1ad8e07 100644 --- a/src/components/notifications/Cellsynt.vue +++ b/src/components/notifications/Cellsynt.vue @@ -14,10 +14,8 @@
-

{{ $t("Alpha (recommended)") }}:
- {{ $t("Alphanumeric string (max 11 characters). The following characters are guaranteed to work: a-z, A-Z and 0-9. Other characters may work but functionality can not be guaranteed. Recipients can not reply to messages with alphanumeric originators.") }}

-

{{ $t("Numeric") }}:
- {{ $t("Numeric value (max 15 digits) with telephone number on international format without leading 00 (example UK number 07920 110 000 should be set as 447920110000). Receiving mobile phone will add a leading + sign and thus see the originator as a normal mobile phone number (+447920110000). Therefore it is also possible to reply to the message.") }}

+

{{ $t("Alpha (recommended)") }}:
{{ $t("Alphanumeric string (max 11 characters). The following characters are guaranteed to work: a-z, A-Z and 0-9. Other characters may work but functionality can not be guaranteed. Recipients can not reply to messages with alphanumeric originators.") }}

+

{{ $t("Numeric") }}:
{{ $t("Numeric value (max 15 digits) with telephone number on international format without leading 00 (example UK number 07920 110 000 should be set as 447920110000). Receiving mobile phone will add a leading + sign and thus see the originator as a normal mobile phone number (+447920110000). Therefore it is also possible to reply to the message.") }}

diff --git a/src/components/notifications/index.js b/src/components/notifications/index.js index 90369fc7..7d5d52d2 100644 --- a/src/components/notifications/index.js +++ b/src/components/notifications/index.js @@ -54,7 +54,6 @@ import ZohoCliq from "./ZohoCliq.vue"; import Splunk from "./Splunk.vue"; import Cellsynt from "./Cellsynt.vue"; - /** * Manage all notification form. * @type { Record }