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

Merged
sergiu merged 4 commits from LINXD-2396-simulator-improvements into master 2023-05-10 07:18:03 +00:00
Showing only changes of commit e2b3b35e33 - Show all commits

View File

@ -90,8 +90,9 @@ class Asset {
this.hubAddress = data.configuration.hub_address;
return callback();
} else {
utils.writeLog(`_getConfiguration | response ${JSON.stringify(response)} | body: ${JSON.stringify(body)}`)
utils.writeLog(`ERROR getting informations about asset ${this.id}`, error);
utils.writeErrorLog(`ERROR_API`);
utils.writeErrorLog(`ERROR_API | _getConfiguration`);
return callback(error);
}
}
@ -99,7 +100,7 @@ class Asset {
}
_checkGroupToJoin(callback) {
console.log('_getConfiguration', this.id);
console.log('_checkGroupToJoin', this.id);
Request.get(
this.apiEndpoint + '/assets/' + this.id + '/groups',
{
@ -119,7 +120,7 @@ class Asset {
return;
}
} 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.writeErrorLog(`ERROR_API | _checkGroupToJoin`);
return callback(error);