mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-19 02:59:50 +00:00
Update homebridge, autobrr, truenas, tubearchivist, watchtower, pyload widgets
This commit is contained in:
parent
f473d324df
commit
00163d2f44
10 changed files with 40 additions and 14 deletions
|
@ -13,8 +13,9 @@ export default function Component({ service }) {
|
|||
const { data: filtersData, error: filtersError } = useWidgetAPI(widget, "filters");
|
||||
const { data: indexersData, error: indexersError } = useWidgetAPI(widget, "indexers");
|
||||
|
||||
if (statsError || filtersError || indexersError) {
|
||||
return <Container error={t("widget.api_error")} />;
|
||||
if (statsError || statsData?.error || filtersError || filtersData?.error || indexersError || indexersData?.error) {
|
||||
const finalError = statsError ?? statsData?.error ?? filtersError ?? filtersData?.error ?? indexersError ?? indexersData?.error;
|
||||
return <Container error={finalError} />;
|
||||
}
|
||||
|
||||
if (!statsData || !filtersData || !indexersData) {
|
||||
|
|
|
@ -7,6 +7,10 @@ const widget = {
|
|||
mappings: {
|
||||
stats: {
|
||||
endpoint: "release/stats",
|
||||
validate: [
|
||||
"push_approved_count",
|
||||
"push_rejected_count"
|
||||
]
|
||||
},
|
||||
filters: {
|
||||
endpoint: "filters",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue