mirror of
https://github.com/gethomepage/homepage.git
synced 2026-09-29 15:31:16 -07:00
Feature: customapi info widget (#7168)
This commit is contained in:
@@ -31,7 +31,7 @@ export async function cleanWidgetGroups(widgets) {
|
||||
const optionKeys = Object.keys(sanitizedOptions);
|
||||
|
||||
// delete private options from the sanitized options
|
||||
["username", "password", "key", "apiKey"].forEach((pO) => {
|
||||
["username", "password", "key", "apiKey", "headers", "requestBody", "method"].forEach((pO) => {
|
||||
if (optionKeys.includes(pO)) {
|
||||
delete sanitizedOptions[pO];
|
||||
}
|
||||
@@ -57,7 +57,7 @@ export async function getPrivateWidgetOptions(type, widgetIndex) {
|
||||
|
||||
const privateOptions =
|
||||
widgets.map((widget) => {
|
||||
const { index, url, username, password, key, apiKey } = widget.options;
|
||||
const { index, url, username, password, key, apiKey, headers, requestBody, method } = widget.options;
|
||||
|
||||
return {
|
||||
type: widget.type,
|
||||
@@ -68,6 +68,9 @@ export async function getPrivateWidgetOptions(type, widgetIndex) {
|
||||
password,
|
||||
key,
|
||||
apiKey,
|
||||
headers,
|
||||
requestBody,
|
||||
method,
|
||||
},
|
||||
};
|
||||
}) || {};
|
||||
|
||||
Reference in New Issue
Block a user