feat: add app actions (#322)
* 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
This commit is contained in:
1 parent
e6e6e4e7d6
commit
8988880439
6 files changed
+37
-6
No files matched your search
@@ -5,6 +5,10 @@ import { api } from "@homarr/api/server";
|
||||
import type { WidgetProps } from "../definition";
|
||||
|
||||
export default async function getServerData({ options }: WidgetProps<"app">) {
|
||||
const app = await api.app.byId({ id: options.appId });
|
||||
return { app };
|
||||
try {
|
||||
const app = await api.app.byId({ id: options.appId });
|
||||
return { app };
|
||||
} catch (error) {
|
||||
return { app: null };
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user