Files
wireguard-ui/src/pages/admin/index.server.ts
T
2026-09-20 15:37:57 +01:00

22 lines
491 B
TypeScript

import type { PagePropsType } from "@/src/types";
import type { BunextPageServerFn } from "@moduletrace/bunext/types";
const server: BunextPageServerFn<PagePropsType> = async (ctx) => {
const props = ctx.props as PagePropsType;
if (!props.main_host?.name) {
return {
redirect: {
destination: `/admin/hosts/add`,
permanent: false,
},
};
}
return {
props: {},
};
};
export default server;