feat: add support for app url variables (#915)
* feat: add support for app url variables * fix: test not working * fix: format issue
This commit is contained in:
1 parent
693e319e26
commit
c4c4d41e4d
13 files changed
+95
-17
No files matched your search
@@ -2,6 +2,7 @@
|
||||
|
||||
import type { RouterOutputs } from "@homarr/api";
|
||||
import { api } from "@homarr/api/server";
|
||||
import { parseAppHrefWithVariablesServer } from "@homarr/common/server";
|
||||
|
||||
import type { WidgetProps } from "../definition";
|
||||
|
||||
@@ -15,7 +16,9 @@ export default async function getServerDataAsync({ options }: WidgetProps<"app">
|
||||
let pingResult: RouterOutputs["widget"]["app"]["ping"] | null = null;
|
||||
|
||||
if (app.href && options.pingEnabled) {
|
||||
pingResult = await api.widget.app.ping({ url: app.href });
|
||||
pingResult = await api.widget.app.ping({
|
||||
url: parseAppHrefWithVariablesServer(app.href),
|
||||
});
|
||||
}
|
||||
|
||||
return { app, pingResult };
|
||||
|
||||
Reference in new issue
Block a user