import { prisma } from "@/lib/prisma";

export async function POST(req: Request) {
  const { visitorId: sessionId, path } = await req.json();

  await prisma.pageView.create({
    data: {
      sessionId,
      path,
    },
  });

  return Response.json({ ok: true });
}
