mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-03-30 13:02:20 +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 url = "https://www.pushplus.plus/send";
|
||||
try {
|
||||
await axios.post(url, {
|
||||
const config = {
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
};
|
||||
const params = {
|
||||
"token": notification.pushPlusSendKey,
|
||||
"title": this.checkStatus(heartbeatJSON, monitorJSON),
|
||||
"content": msg,
|
||||
"template": "html"
|
||||
}, { headers: { "Content-Type": "application/json" } }
|
||||
);
|
||||
return okMsg;
|
||||
|
||||
};
|
||||
await axios.post(url, params, config);
|
||||
} catch (error) {
|
||||
this.throwGeneralAxiosError(error);
|
||||
console.error("PushPlus Error:", error.response?.data || error.message);
|
||||
|
|
Loading…
Add table
Reference in a new issue