웹 로그, DB 쿼리문과 결과 로그 출력
This commit is contained in:
@@ -1,17 +1,10 @@
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
import { auth } from "@/auth";
|
||||
import { getExtensionRequests } from "@/lib/extension-requests";
|
||||
import { withApiHandler } from "@/lib/api-handler";
|
||||
|
||||
export async function GET(request: Request) {
|
||||
const session = await auth();
|
||||
|
||||
if (!session) {
|
||||
return NextResponse.json({ message: "Unauthorized" }, { status: 401 });
|
||||
}
|
||||
|
||||
export const GET = withApiHandler("extension-requests", async (request) => {
|
||||
const url = new URL(request.url);
|
||||
const result = await getExtensionRequests(url.searchParams);
|
||||
|
||||
return NextResponse.json(result);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user