Update WPush Notification Provider

Co-authored-by: Frank Elsinga <frank@elsinga.de>
pull/4603/head
Alone88 2 months ago committed by GitHub
parent 31d459c342
commit b933e82e48
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -12,14 +12,15 @@ class WPush extends NotificationProvider {
const okMsg = "Sent Successfully.";
try {
const ret = await axios.post("https://api.wpush.cn/api/v1/send", {
const context = {
"title": this.checkStatus(heartbeatJSON, monitorJSON),
"content": msg,
"apikey": notification.wpushAPIkey,
"channel": notification.wpushChannel
});
if (ret.data.code !== 0) {
return ret.data.message;
};
const result = await axios.post("https://api.wpush.cn/api/v1/send", context);
if (result.data.code !== 0) {
throw response.data.message;
}
return okMsg;

Loading…
Cancel
Save