mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-17 22:43:42 +08:00
优化黑白名单
This commit is contained in:
@@ -8,7 +8,8 @@ import {
|
||||
// DatePicker,
|
||||
} from "@tremor/react";
|
||||
import UsageByModel from "./usage-by-model-chart";
|
||||
import { getSession, ADMIN_LIST, isName } from "@/lib/auth";
|
||||
import { getSession } from "@/lib/auth";
|
||||
import { isName, ADMIN_LIST } from "@/lib/auth_list";
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
export default async function AdminPage() {
|
||||
|
||||
@@ -3,7 +3,8 @@ import { Metadata } from "next";
|
||||
import { ReactNode } from "react";
|
||||
// import { useEffect } from "react";
|
||||
// import {useSession} from "next-auth/react";
|
||||
import { getSession, isName } from "@/lib/auth";
|
||||
import { getSession } from "@/lib/auth";
|
||||
import { isName } from "@/lib/auth_list";
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { signIn } from "next-auth/react";
|
||||
import React, { useState, useEffect, useRef } from "react";
|
||||
import { isName } from "@/lib/auth";
|
||||
import { isName } from "@/lib/auth_list";
|
||||
|
||||
export default function UserLoginButton() {
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
@@ -4,7 +4,8 @@ import { Home } from "./components/home";
|
||||
|
||||
import { getServerSideConfig } from "./config/server";
|
||||
|
||||
import { getSession, isName } from "@/lib/auth";
|
||||
import { getSession } from "@/lib/auth";
|
||||
import { isName } from "@/lib/auth_list";
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
const serverConfig = getServerSideConfig();
|
||||
|
||||
Reference in New Issue
Block a user