From 1436e8df2650c4d0f681f7898bdf657f50ac4362 Mon Sep 17 00:00:00 2001 From: sijinhui Date: Sun, 7 Apr 2024 22:26:18 +0800 Subject: [PATCH] fix debug --- app/app/(admin)/layout.tsx | 12 ++++++------ app/app/(auth)/layout.tsx | 14 +++++++------- app/page.tsx | 12 ++++++------ prisma/schema.prisma | 2 +- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/app/app/(admin)/layout.tsx b/app/app/(admin)/layout.tsx index 92db1db6d..85a4084eb 100644 --- a/app/app/(admin)/layout.tsx +++ b/app/app/(admin)/layout.tsx @@ -3,8 +3,8 @@ import { Metadata } from "next"; import { ReactNode } from "react"; import { AntdRegistry } from "@ant-design/nextjs-registry"; // import Head from "next/head"; -import { VerifiedAdminUser, VerifiedUser } from "@/lib/auth"; -import { redirect } from "next/navigation"; +// import { VerifiedAdminUser, VerifiedUser } from "@/lib/auth"; +// import { redirect } from "next/navigation"; export const metadata: Metadata = { title: "Admin | 管理页面", @@ -15,10 +15,10 @@ export default async function AdminLayout({ }: { children: ReactNode; }) { - const isAdmin = await VerifiedAdminUser(); - if (!isAdmin) { - redirect("/"); - } + // const isAdmin = await VerifiedAdminUser(); + // if (!isAdmin) { + // redirect("/"); + // } return ( <> diff --git a/app/app/(auth)/layout.tsx b/app/app/(auth)/layout.tsx index 2de0cbbad..60f219ccb 100644 --- a/app/app/(auth)/layout.tsx +++ b/app/app/(auth)/layout.tsx @@ -1,8 +1,8 @@ import "@/app/app/login.scss"; import { Metadata } from "next"; import { ReactNode } from "react"; -import { VerifiedUser } from "@/lib/auth"; -import { redirect } from "next/navigation"; +// import { VerifiedUser } from "@/lib/auth"; +// import { redirect } from "next/navigation"; export const metadata: Metadata = { title: "Login | 实人认证", @@ -13,11 +13,11 @@ export default async function AuthLayout({ }: { children: ReactNode; }) { - const isUser = await VerifiedUser(); - if (isUser) { - // Replace '/dashboard' with the desired redirect path - redirect("/"); - } + // const isUser = await VerifiedUser(); + // if (isUser) { + // // Replace '/dashboard' with the desired redirect path + // redirect("/"); + // } return (
diff --git a/app/page.tsx b/app/page.tsx index 2c9dfb24d..b1826b795 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -4,16 +4,16 @@ import { Home } from "./components/home"; import { getServerSideConfig } from "./config/server"; -import { VerifiedUser } from "@/lib/auth"; -import { redirect } from "next/navigation"; +// import { VerifiedUser } from "@/lib/auth"; +// import { redirect } from "next/navigation"; const serverConfig = getServerSideConfig(); export default async function App() { - const isUser = await VerifiedUser(); - if (!isUser) { - redirect("/login"); - } + // const isUser = await VerifiedUser(); + // if (!isUser) { + // redirect("/login"); + // } return ( <> diff --git a/prisma/schema.prisma b/prisma/schema.prisma index d75ccb125..59f94bb03 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -9,7 +9,7 @@ datasource db { generator client { provider = "prisma-client-js" - binaryTargets = ["native", "linux-musl-openssl-3.0.x"] + binaryTargets = ["native", "linux-musl-openssl-3.0.x", "linux-musl-arm64-openssl-3.0.x"] } model User {