added dapnet support, finally working ;-)
This commit is contained in:
parent
6c2c8965e7
commit
90e2391a8f
2 changed files with 8 additions and 6 deletions
|
@ -22,7 +22,7 @@
|
||||||
},
|
},
|
||||||
"dapnet": {
|
"dapnet": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"endpoint": "dapnet.afu.rwth-aachen.de",
|
"endpoint": "http://hampager.de:8080/calls",
|
||||||
"username": "DAPNET_Username",
|
"username": "DAPNET_Username",
|
||||||
"password": "DAPNET_Passwort"
|
"password": "DAPNET_Passwort"
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,11 +29,13 @@ class DAPNETConnector extends Connector {
|
||||||
console.log(config.connectors.dapnet.endpoint, dapnetRequest, extraParameters)
|
console.log(config.connectors.dapnet.endpoint, dapnetRequest, extraParameters)
|
||||||
return axios.post(config.connectors.dapnet.endpoint, dapnetRequest, extraParameters)
|
return axios.post(config.connectors.dapnet.endpoint, dapnetRequest, extraParameters)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.connectorRegistry.reportState(msg, UUID, 'routed')
|
this.connectorRegistry.reportState(msg, UUID, 'routed')
|
||||||
return true
|
return true
|
||||||
}).catch((err) => {
|
})
|
||||||
this.connectorRegistry.reportFail(msg, UUID)
|
.catch((err) => {
|
||||||
return false
|
console.error(err.response.data)
|
||||||
|
this.connectorRegistry.reportFail(msg, UUID)
|
||||||
|
return false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue