WebHooks saving the Signals file
This commit is contained in:
1 parent
80a209d447
commit
61810c939b
10 files changed
+98
-198
No files matched your search
@@ -5,14 +5,18 @@ function newWebhookFunctions () {
|
||||
|
||||
return thisObject
|
||||
|
||||
function sendTestMessage (node) {
|
||||
function sendTestMessage (node, callBackFunction) {
|
||||
let testMessage = loadPropertyFromNodeConfig(node.payload, 'testMessage')
|
||||
let letURL = loadPropertyFromNodeConfig(node.payload, 'webhookURL')
|
||||
|
||||
callServer(testMessage, letURL, onResponse)
|
||||
|
||||
function onResponse (err) {
|
||||
console.log(err)
|
||||
if (err.result === GLOBAL.DEFAULT_OK_RESPONSE.result) {
|
||||
callBackFunction(GLOBAL.DEFAULT_OK_RESPONSE)
|
||||
} else {
|
||||
callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user