diff --git a/server/notification-providers/clicksendsms.js b/server/notification-providers/clicksendsms.js index a5075af71..74e2f4c59 100644 --- a/server/notification-providers/clicksendsms.js +++ b/server/notification-providers/clicksendsms.js @@ -20,16 +20,15 @@ class ClickSendSMS extends NotificationProvider { messages: [ { "body": msg.replace(/[^\x00-\x7F]/g, ""), - // TODO: To phone number concept to be added - "to": "+61411111111", + "to": notification.clicksendsmsToNumber, "source": "uptime-kuma", "from": notification.clicksendsmsSenderName, } ] }; let resp = await axios.post("https://rest.clicksend.com/v3/sms/send", data, config); - if (resp.data.http_code !== 200) { - let error = "Something gone wrong. Api returned " + resp.data.response.status + "."; + if (resp.data.data.messages[0].status !== "SUCCESS") { + let error = "Something gone wrong. Api returned " + resp.data.data.messages[0].status + "."; this.throwGeneralAxiosError(error); } diff --git a/src/components/notifications/ClickSendSMS.vue b/src/components/notifications/ClickSendSMS.vue index 6e23aebe7..2aed4184b 100644 --- a/src/components/notifications/ClickSendSMS.vue +++ b/src/components/notifications/ClickSendSMS.vue @@ -12,9 +12,13 @@
{{ $t("checkPrice", [$t("clicksendsms")]) }} - here + https://clicksend.com/us/pricing
+
+ + +
-