mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-17 11:44:38 -05:00
provider name fix
This commit is contained in:
parent
e557545c97
commit
d44663c57c
@ -4,7 +4,7 @@ const { UP } = require("../../src/util");
|
|||||||
|
|
||||||
class GoAlert extends NotificationProvider {
|
class GoAlert extends NotificationProvider {
|
||||||
|
|
||||||
name = "goalert";
|
name = "GoAlert";
|
||||||
|
|
||||||
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
||||||
let okMsg = "Sent Successfully.";
|
let okMsg = "Sent Successfully.";
|
||||||
@ -13,9 +13,9 @@ class GoAlert extends NotificationProvider {
|
|||||||
token: notification.goAlertToken,
|
token: notification.goAlertToken,
|
||||||
summary: msg,
|
summary: msg,
|
||||||
};
|
};
|
||||||
if (heartbeatJSON["status"] === UP) {
|
// if (heartbeatJSON["status"] === UP) {
|
||||||
parameters["action"] = closeAction;
|
// parameters["action"] = closeAction;
|
||||||
}
|
// }
|
||||||
try {
|
try {
|
||||||
await axios.post(`${notification.goAlertBaseURL}/api/v2/generic/incoming`, {
|
await axios.post(`${notification.goAlertBaseURL}/api/v2/generic/incoming`, {
|
||||||
params: parameters,
|
params: parameters,
|
||||||
@ -24,6 +24,7 @@ class GoAlert extends NotificationProvider {
|
|||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
let msg = (error.response.data) ? error.response.data : "Error without response";
|
let msg = (error.response.data) ? error.response.data : "Error without response";
|
||||||
|
console.log(error)
|
||||||
throw new Error(msg);
|
throw new Error(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user