diff --git a/server/notification-providers/pushplus.js b/server/notification-providers/pushplus.js index 9cceec3e4..36c4929cd 100644 --- a/server/notification-providers/pushplus.js +++ b/server/notification-providers/pushplus.js @@ -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);