feat: update API response structure to nest payloads under a single "data" key
This commit is contained in:
1 parent
c0eada9bcc
commit
d96b90b5bf
8 files changed
+36
-29
No files matched your search
@@ -43,12 +43,13 @@ async function load() {
|
||||
serverApi.infoAll(),
|
||||
settingsApi.get('bot_node_config')
|
||||
]);
|
||||
const nodeConf = (nodes && nodes.config) || {};
|
||||
const statusData = (status && status.data) || {};
|
||||
const infoData = (info && info.data) || {};
|
||||
const nodeConf = (nodes && nodes.data && nodes.data.config) || {};
|
||||
const list = [];
|
||||
for (const key of Object.keys(status)) {
|
||||
if (key === 'success') continue;
|
||||
const s = status[key] || {};
|
||||
const infoEntry = info[key] || {};
|
||||
for (const key of Object.keys(statusData)) {
|
||||
const s = statusData[key] || {};
|
||||
const infoEntry = infoData[key] || {};
|
||||
const conf = nodeConf[key] || {};
|
||||
list.push({
|
||||
uuid: s.uuid || key,
|
||||
|
||||
Reference in new issue
Block a user