mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-05 02:06:41 +00:00
remove server admin from config and add onboarding ui
This commit is contained in:
@@ -11,6 +11,7 @@ import { pullEnv } from "@app/lib/pullEnv";
|
||||
import { cleanRedirect } from "@app/lib/cleanRedirect";
|
||||
import { Layout } from "@app/components/Layout";
|
||||
import { rootNavItems } from "./navigation";
|
||||
import { InitialSetupCompleteResponse } from "@server/routers/auth";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
@@ -27,6 +28,15 @@ export default async function Page(props: {
|
||||
const getUser = cache(verifySession);
|
||||
const user = await getUser({ skipCheckVerifyEmail: true });
|
||||
|
||||
const setupRes = await internal.get<
|
||||
AxiosResponse<InitialSetupCompleteResponse>
|
||||
>(`/auth/initial-setup-complete`, await authCookieHeader());
|
||||
const complete = setupRes.data.data.complete;
|
||||
if (!complete) {
|
||||
console.log("compelte", complete);
|
||||
redirect("/auth/initial-setup");
|
||||
}
|
||||
|
||||
if (!user) {
|
||||
if (params.redirect) {
|
||||
const safe = cleanRedirect(params.redirect);
|
||||
|
||||
Reference in New Issue
Block a user