mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-04-02 14:32:21 +00:00
Change formatting
This commit is contained in:
parent
7ce61677cb
commit
9b78f6c988
1 changed files with 8 additions and 5 deletions
|
@ -17,15 +17,18 @@ class PushPlus extends NotificationProvider {
|
||||||
const okMsg = "Sent Successfully.";
|
const okMsg = "Sent Successfully.";
|
||||||
const url = "https://www.pushplus.plus/send";
|
const url = "https://www.pushplus.plus/send";
|
||||||
try {
|
try {
|
||||||
await axios.post(url, {
|
const config = {
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
const params = {
|
||||||
"token": notification.pushPlusSendKey,
|
"token": notification.pushPlusSendKey,
|
||||||
"title": this.checkStatus(heartbeatJSON, monitorJSON),
|
"title": this.checkStatus(heartbeatJSON, monitorJSON),
|
||||||
"content": msg,
|
"content": msg,
|
||||||
"template": "html"
|
"template": "html"
|
||||||
}, { headers: { "Content-Type": "application/json" } }
|
};
|
||||||
);
|
await axios.post(url, params, config);
|
||||||
return okMsg;
|
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.throwGeneralAxiosError(error);
|
this.throwGeneralAxiosError(error);
|
||||||
console.error("PushPlus Error:", error.response?.data || error.message);
|
console.error("PushPlus Error:", error.response?.data || error.message);
|
||||||
|
|
Loading…
Add table
Reference in a new issue