11 lines
341 B
TypeScript
11 lines
341 B
TypeScript
import { NextResponse } from "next/server";
|
|
|
|
import { getMaestros } from "@/lib/maestros";
|
|
import { withApiHandler } from "@/lib/api-handler";
|
|
|
|
export const GET = withApiHandler("maestros", async (request) => {
|
|
const url = new URL(request.url);
|
|
const result = await getMaestros(url.searchParams);
|
|
return NextResponse.json(result);
|
|
});
|