nikki: sync upstream

last commit: b610d31247
This commit is contained in:
gitea-action 2025-04-16 19:00:23 +08:00
parent 72048a713c
commit 251d5c0941

View File

@ -41,12 +41,12 @@ fi
\`\`\`json \`\`\`json
` `
ucode -S -e ' ucode -S -e '
import { connect } from "ubus"; import { cursor } from "uci";
const ubus = connect(); const uci = cursor();
const config = ubus.call("uci", "get", { "config": "nikki" }); const config = uci.get_all("nikki");
const result = {}; const result = {};
for (let section_id in config.values) { for (let section_id in config) {
const section = config.values[section_id]; const section = config[section_id];
const section_type = section[".type"]; const section_type = section[".type"];
if (result[section_type] == null) { if (result[section_type] == null) {
result[section_type] = []; result[section_type] = [];