mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-28 06:59:42 -08:00
Fixed Octopush Notifier not working #2144
The version number was passed as a string from the frontend but was checked against a number in the backend provider. This caused the if else if to fall through into an error. The literal it is now being compared has been changed to a string and the unknown version error is no longer encountered. Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
This commit is contained in:
parent
ceeb47bf82
commit
2e54dee817
|
@ -10,7 +10,7 @@ class Octopush extends NotificationProvider {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Default - V2
|
// Default - V2
|
||||||
if (notification.octopushVersion === 2 || !notification.octopushVersion) {
|
if (notification.octopushVersion === "2" || !notification.octopushVersion) {
|
||||||
let config = {
|
let config = {
|
||||||
headers: {
|
headers: {
|
||||||
"api-key": notification.octopushAPIKey,
|
"api-key": notification.octopushAPIKey,
|
||||||
|
@ -31,7 +31,7 @@ class Octopush extends NotificationProvider {
|
||||||
"sender": notification.octopushSenderName
|
"sender": notification.octopushSenderName
|
||||||
};
|
};
|
||||||
await axios.post("https://api.octopush.com/v1/public/sms-campaign/send", data, config);
|
await axios.post("https://api.octopush.com/v1/public/sms-campaign/send", data, config);
|
||||||
} else if (notification.octopushVersion === 1) {
|
} else if (notification.octopushVersion === "1") {
|
||||||
let data = {
|
let data = {
|
||||||
"user_login": notification.octopushDMLogin,
|
"user_login": notification.octopushDMLogin,
|
||||||
"api_key": notification.octopushDMAPIKey,
|
"api_key": notification.octopushDMAPIKey,
|
||||||
|
|
Loading…
Reference in a new issue