mongo fix

This commit is contained in:
gosangam
2026-04-14 19:12:11 +05:30
parent e2f8063d90
commit beffb9fae1
172 changed files with 18029 additions and 1298 deletions
+12
View File
@@ -0,0 +1,12 @@
import { NextResponse } from "next/server";
import { prisma } from "@/lib/db";
export async function GET(
_req: Request,
{ params }: { params: Promise<{ book: string }> }
) {
const { book } = await params;
const meta = await prisma.bookMeta.findUnique({ where: { book } });
if (!meta) return NextResponse.json({ error: "Not found" }, { status: 404 });
return NextResponse.json({ book: meta.book, ...meta.data as Record<string, unknown> });
}