mirror of
https://github.com/ajnart/homarr.git
synced 2026-02-27 08:50:56 +01:00
* feat: add app actions * fix: broken lockfile * fix: app should only load when one is selected and server data not fail when no app found * fix: add missing dependency * fix: format issue
15 lines
327 B
TypeScript
15 lines
327 B
TypeScript
"use server";
|
|
|
|
import { api } from "@homarr/api/server";
|
|
|
|
import type { WidgetProps } from "../definition";
|
|
|
|
export default async function getServerData({ options }: WidgetProps<"app">) {
|
|
try {
|
|
const app = await api.app.byId({ id: options.appId });
|
|
return { app };
|
|
} catch (error) {
|
|
return { app: null };
|
|
}
|
|
}
|