Phase 4. 마에스트로 목록 화면 구현
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
import { auth } from "@/auth";
|
||||
import { getMaestros } from "@/lib/maestros";
|
||||
|
||||
export async function GET(request: Request) {
|
||||
const session = await auth();
|
||||
|
||||
if (!session) {
|
||||
return NextResponse.json({ message: "Unauthorized" }, { status: 401 });
|
||||
}
|
||||
|
||||
const url = new URL(request.url);
|
||||
const result = await getMaestros(url.searchParams);
|
||||
|
||||
return NextResponse.json(result);
|
||||
}
|
||||
Reference in New Issue
Block a user