import { NextResponse } from "next/server"; import { getBookMeta } from "@/lib/api"; export async function GET( _req: Request, { params }: { params: Promise<{ book: string }> }, ) { const { book } = await params; const meta = await getBookMeta(book); if (!meta) return NextResponse.json({ error: "Not found" }, { status: 404 }); return NextResponse.json(meta); }