Delete Await Disconnect & Method API

This commit is contained in:
2025-02-11 12:14:24 +08:00
parent 2a93fa787f
commit 7c1d17079a
22 changed files with 21 additions and 226 deletions

View File

@@ -6,15 +6,6 @@ import { NextResponse } from "next/server";
export async function GET(request: Request, { params }: {
params: { name: string }
}) {
const method = request.method;
if (method !== "GET") {
return NextResponse.json({
success: false,
message: "Method not allowed",
},
{ status: 405 }
);
}
const { name } = params;
try {
let fixData;
@@ -59,7 +50,5 @@ export async function GET(request: Request, { params }: {
},
{ status: 500 }
)
} finally {
await prisma.$disconnect
}
}