Feature: allow disable ipv6 in proxy, refactor cacheFetch to use proxy (#5011)
Some checks are pending
Docker / Linting Checks (push) Waiting to run
Docker / Docker Build & Push (push) Blocked by required conditions

This commit is contained in:
shamoon
2025-03-16 20:09:34 -07:00
committed by GitHub
parent 934ad3a6f1
commit b4dc53c7c0
10 changed files with 61 additions and 65 deletions

View File

@@ -56,21 +56,22 @@ export async function cleanWidgetGroups(widgets) {
export async function getPrivateWidgetOptions(type, widgetIndex) {
const widgets = await widgetsFromConfig();
const privateOptions = widgets.map((widget) => {
const { index, url, username, password, key, apiKey } = widget.options;
const privateOptions =
widgets.map((widget) => {
const { index, url, username, password, key, apiKey } = widget.options;
return {
type: widget.type,
options: {
index,
url,
username,
password,
key,
apiKey,
},
};
});
return {
type: widget.type,
options: {
index,
url,
username,
password,
key,
apiKey,
},
};
}) || {};
return type !== undefined && widgetIndex !== undefined
? privateOptions.find((o) => o.type === type && o.options.index === parseInt(widgetIndex, 10))?.options