From 90e2391a8ffaccb9a5e49febba7d62bc3d492515 Mon Sep 17 00:00:00 2001 From: cheetah Date: Wed, 31 Mar 2021 21:36:29 +0000 Subject: [PATCH] added dapnet support, finally working ;-) --- config.json | 2 +- types/connectors/DAPNETConnector.js | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/config.json b/config.json index 09145a1..6a05db2 100644 --- a/config.json +++ b/config.json @@ -22,7 +22,7 @@ }, "dapnet": { "enabled": true, - "endpoint": "dapnet.afu.rwth-aachen.de", + "endpoint": "http://hampager.de:8080/calls", "username": "DAPNET_Username", "password": "DAPNET_Passwort" } diff --git a/types/connectors/DAPNETConnector.js b/types/connectors/DAPNETConnector.js index 45ca1ba..2b7eb8c 100644 --- a/types/connectors/DAPNETConnector.js +++ b/types/connectors/DAPNETConnector.js @@ -29,11 +29,13 @@ class DAPNETConnector extends Connector { console.log(config.connectors.dapnet.endpoint, dapnetRequest, extraParameters) return axios.post(config.connectors.dapnet.endpoint, dapnetRequest, extraParameters) .then(() => { - this.connectorRegistry.reportState(msg, UUID, 'routed') - return true - }).catch((err) => { - this.connectorRegistry.reportFail(msg, UUID) - return false + this.connectorRegistry.reportState(msg, UUID, 'routed') + return true + }) + .catch((err) => { + console.error(err.response.data) + this.connectorRegistry.reportFail(msg, UUID) + return false }) } }