feat: update API response structure to nest payloads under a single "data" key

This commit is contained in:
NanamiAdmin committed 2026-09-09 16:15:33 +08:00
1 parent c0eada9bcc
commit d96b90b5bf
8 files changed
+36 -29

No files matched your search

+6 -5
View File
@@ -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,