From d4b8eebd647a3f042de4e04f150d2f1cf8e5e84e Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Thu, 19 Jun 2025 12:11:43 +0800 Subject: [PATCH] cleanup --- server/service/networkService.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/server/service/networkService.js b/server/service/networkService.js index 5ad28e594..08b2f065e 100755 --- a/server/service/networkService.js +++ b/server/service/networkService.js @@ -432,9 +432,9 @@ class NetworkService { throw err; } - async requestWebhook(platform, url, message) { + async requestWebhook(type, url, body) { try { - const response = await this.axios.post(url, message, { + const response = await this.axios.post(url, body, { headers: { "Content-Type": "application/json", }, @@ -444,7 +444,7 @@ class NetworkService { type: "webhook", status: true, code: response.status, - message: `Successfully sent ${platform} notification`, + message: `Successfully sent ${type} notification`, payload: response.data, }; } catch (error) { @@ -452,19 +452,13 @@ class NetworkService { message: error.message, service: this.SERVICE_NAME, method: "requestWebhook", - url, - platform, - error: error.message, - statusCode: error.response?.status, - responseData: error.response?.data, - requestPayload: message, }); return { type: "webhook", status: false, code: error.response?.status || this.NETWORK_ERROR, - message: `Failed to send ${platform} notification`, + message: `Failed to send ${type} notification`, payload: error.response?.data, }; }