First Commit

This commit is contained in:
2026-09-12 13:56:36 +01:00
commit 4d75af0418
426 changed files with 36452 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
import grabUsers from "@/src/functions/backend/db/users/grab-users";
import type { PagePropsType } from "@/src/types";
import type { BunextPageServerFn } from "@moduletrace/bunext/types";
export const server: BunextPageServerFn<PagePropsType> = async (ctx) => {
if (ctx.props.user?.id) {
return {
redirect: {
destination: `/admin`,
},
};
}
const users_res = await grabUsers();
if (users_res.singleRes?.id) {
return {
redirect: {
destination: `/auth/login`,
},
};
}
return {};
};