From ea652d5f331ca78ce8f2defc4c61e47129f7a295 Mon Sep 17 00:00:00 2001 From: sijinhui Date: Tue, 2 Apr 2024 00:12:39 +0800 Subject: [PATCH] fix auth --- app/api/admin/users/[[...path]]/route.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/app/api/admin/users/[[...path]]/route.ts b/app/api/admin/users/[[...path]]/route.ts index 55fad8960..00276586a 100644 --- a/app/api/admin/users/[[...path]]/route.ts +++ b/app/api/admin/users/[[...path]]/route.ts @@ -1,17 +1,10 @@ import { NextRequest, NextResponse } from "next/server"; import prisma from "@/lib/prisma"; -import { VerifiedAdminUser } from "@/lib/auth"; async function handle( req: NextRequest, { params }: { params: { path: string[] } }, ) { - // 认证,管理员权限 - const isAdmin = await VerifiedAdminUser(); - if (isAdmin) { - return NextResponse.json({ error: "无权限" }, { status: 401 }); - } - // 判断网址和请求方法 const method = req.method; // const url = req.url;