Files
homarr/packages/widgets/src/app/serverData.ts
T
Thomas CamlongandMeier Lukas f1b1ec59ec chore: update prettier configuration for print width (#519)
* feat: update prettier configuration for print width

* chore: apply code formatting to entire repository

* fix: remove build files

* fix: format issue

---------

Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
2024-05-19 22:38:39 +02:00

15 lines
332 B
TypeScript

"use server";
import { api } from "@homarr/api/server";
import type { WidgetProps } from "../definition";
export default async function getServerDataAsync({ options }: WidgetProps<"app">) {
try {
const app = await api.app.byId({ id: options.appId });
return { app };
} catch (error) {
return { app: null };
}
}