Change formatting

This commit is contained in:
Frank Elsinga 2025-03-25 00:53:29 +01:00 committed by GitHub
parent 7ce61677cb
commit 9b78f6c988
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);