From 9b78f6c988dbcef2fe73b97438a1b04a669c59d5 Mon Sep 17 00:00:00 2001 From: Frank Elsinga <frank@elsinga.de> Date: Tue, 25 Mar 2025 00:53:29 +0100 Subject: [PATCH] Change formatting --- server/notification-providers/pushplus.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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);