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

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

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

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