mirror of
https://github.com/benphelps/homepage.git
synced 2025-12-20 21:29:42 +01:00
Added custom API widget (#1858)
* Added custom API widget * Rename custom widget to customapi --------- Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
@@ -299,6 +299,8 @@ export function cleanServiceGroups(groups) {
|
||||
stream, // mjpeg
|
||||
fit,
|
||||
method, // openmediavault widget
|
||||
mappings, // customapi widget
|
||||
refreshInterval,
|
||||
} = cleanedService.widget;
|
||||
|
||||
let fieldsList = fields;
|
||||
@@ -372,6 +374,10 @@ export function cleanServiceGroups(groups) {
|
||||
if (type === "openmediavault") {
|
||||
if (method) cleanedService.widget.method = method;
|
||||
}
|
||||
if (type === "customapi") {
|
||||
if (mappings) cleanedService.widget.mappings = mappings;
|
||||
if (refreshInterval) cleanedService.widget.refreshInterval = refreshInterval;
|
||||
}
|
||||
}
|
||||
|
||||
return cleanedService;
|
||||
|
||||
Reference in New Issue
Block a user