LINXD-2396: Get Hub address from asset configuration; Take default main group if not specified in config; Update config to not declare hub address and voice server #6
@ -90,8 +90,9 @@ class Asset {
|
|||||||
this.hubAddress = data.configuration.hub_address;
|
this.hubAddress = data.configuration.hub_address;
|
||||||
return callback();
|
return callback();
|
||||||
} else {
|
} else {
|
||||||
|
utils.writeLog(`_getConfiguration | response ${JSON.stringify(response)} | body: ${JSON.stringify(body)}`)
|
||||||
utils.writeLog(`ERROR getting informations about asset ${this.id}`, error);
|
utils.writeLog(`ERROR getting informations about asset ${this.id}`, error);
|
||||||
utils.writeErrorLog(`ERROR_API`);
|
utils.writeErrorLog(`ERROR_API | _getConfiguration`);
|
||||||
return callback(error);
|
return callback(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -99,7 +100,7 @@ class Asset {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_checkGroupToJoin(callback) {
|
_checkGroupToJoin(callback) {
|
||||||
console.log('_getConfiguration', this.id);
|
console.log('_checkGroupToJoin', this.id);
|
||||||
Request.get(
|
Request.get(
|
||||||
this.apiEndpoint + '/assets/' + this.id + '/groups',
|
this.apiEndpoint + '/assets/' + this.id + '/groups',
|
||||||
{
|
{
|
||||||
@ -119,7 +120,7 @@ class Asset {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
utils.writeLog(`_getConfiguration | response ${JSON.stringify(response)} | body: ${JSON.stringify(body)}`)
|
utils.writeLog(`_checkGroupToJoin | response ${JSON.stringify(response)} | body: ${JSON.stringify(body)}`)
|
||||||
utils.writeLog(`ERROR getting informations about asset ${this.id}`, error);
|
utils.writeLog(`ERROR getting informations about asset ${this.id}`, error);
|
||||||
utils.writeErrorLog(`ERROR_API | _checkGroupToJoin`);
|
utils.writeErrorLog(`ERROR_API | _checkGroupToJoin`);
|
||||||
return callback(error);
|
return callback(error);
|
||||||
|
Loading…
Reference in New Issue
Block a user