웹 로그, DB 쿼리문과 결과 로그 출력

This commit is contained in:
2026-06-22 22:34:56 +09:00
parent bcd0ef2af3
commit f384388c67
21 changed files with 706 additions and 214 deletions
+3 -10
View File
@@ -1,17 +1,10 @@
import { NextResponse } from "next/server";
import { auth } from "@/auth";
import { getMaestros } from "@/lib/maestros";
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("maestros", async (request) => {
const url = new URL(request.url);
const result = await getMaestros(url.searchParams);
return NextResponse.json(result);
}
});