This commit is contained in:
Luis Fernando Molina committed 2020-04-16 18:19:58 +02:00
1 parent abb05c7e77
commit b5d3971ee0
2 files changed
+24 -1

No files matched your search

@@ -0,0 +1,18 @@
function newWebhookFunctions () {
thisObject = {
sendTestMessage: sendTestMessage
}
return thisObject
function sendTestMessage (node) {
let testMessage = loadPropertyFromNodeConfig(node.payload, 'testMessage')
let letURL = loadPropertyFromNodeConfig(node.payload, 'webhookURL')
callServer(testMessage, letURL, onResponse)
function onResponse (err) {
console.log(err)
}
}
}
+6 -1
View File
@@ -59,6 +59,7 @@ function newWorkspace () {
let functionLibraryOnFocus = newOnFocus()
let functionLibrarySuperScripts = newSuperScriptsFunctions()
let functionLibraryCCXTFunctions = newCCXTFunctions()
let functionLibraryWebhookFunctions = newWebhookFunctions()
thisObject.nodeChildren = newNodeChildren()
@@ -411,7 +412,11 @@ function newWorkspace () {
functionLibraryCCXTFunctions.addMissingMarkets(payload.node, functionLibraryUiObjectsFromNodes, functionLibraryNodeCloning)
}
break
case 'Send Webhook Test Message':
{
functionLibraryWebhookFunctions.sendTestMessage(payload.node)
}
break
case 'Run Session':
{
functionLibrarySessionFunctions.runSession(payload.node, functionLibraryProtocolNode, callBackFunction)