Fixes for discord webhook (not finished yet)

This commit is contained in:
Vortrex
2022-04-06 16:36:50 -05:00
parent 5d762ac09e
commit 1752a1a659
5 changed files with 29 additions and 18 deletions

View File

@@ -395,12 +395,15 @@ function getClientFromSyncerId(syncerId) {
// ===========================================================================
async function triggerWebHook(webHookURL, payloadData) {
async function triggerWebHook(webHookURL, messageString) {
return new Promise(resolve => {
//console.warn(webHookURL);
let tempURL = getGlobalConfig().discord.webhook.baseURL;
tempURL = tempURL.replace("{0}", messageString);
tempURL = tempURL.replace("{1}", webHookURL);
httpGet(
webHookURL,
`data=${payloadData}`,
tempURL,
"",
function(data) {
//console.warn(JSON.parse(data));
},