* fix(deps): update tanstack-query monorepo to ^5.53.2 (#1055) Co-authored-by: homarr-renovate[bot] <158783068+homarr-renovate[bot]@users.noreply.github.com> <br/> <div align="center"> <img src="https://homarr.dev/img/logo.png" height="80" alt="" /> <h3>Homarr</h3> </div> **Thank you for your contribution. Please ensure that your pull request meets the following pull request:** - [ ] Builds without warnings or errors (``pnpm buid``, autofix with ``pnpm format:fix``) - [ ] Pull request targets ``dev`` branch - [ ] Commits follow the [conventional commits guideline](https://www.conventionalcommits.org/en/v1.0.0/) - [ ] No shorthand variable names are used (eg. ``x``, ``y``, ``i`` or any abbrevation) * fix: requested changes * fix: requested changes * feat: add cron job * fix: review changes * fix: add missing oldmarr import mappings --------- Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
28 lines
532 B
TypeScript
28 lines
532 B
TypeScript
"use server";
|
|
|
|
import { api } from "@homarr/api/server";
|
|
|
|
import type { WidgetProps } from "../definition";
|
|
|
|
export default async function getServerDataAsync({ integrationIds }: WidgetProps<"indexerManager">) {
|
|
if (integrationIds.length === 0) {
|
|
return {
|
|
initialData: [],
|
|
};
|
|
}
|
|
|
|
try {
|
|
const currentIndexers = await api.widget.indexerManager.getIndexersStatus({
|
|
integrationIds,
|
|
});
|
|
|
|
return {
|
|
initialData: currentIndexers,
|
|
};
|
|
} catch {
|
|
return {
|
|
initialData: [],
|
|
};
|
|
}
|
|
}
|