Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
fix: prisma undefined
Marc Seitz62acb34df674
diff --git a/pages/api/file/browser-upload.ts b/pages/api/file/browser-upload.tsindex 845b0d01..3d9bc564 100644--- a/pages/api/file/browser-upload.ts+++ b/pages/api/file/browser-upload.ts@@ -3,6 +3,7 @@ import type { NextApiResponse, NextApiRequest } from "next";import { getServerSession } from "next-auth/next";import { authOptions } from "../auth/[...nextauth]";import { CustomUser } from "@/lib/types";+import prisma from "@/lib/prisma";export default async function handler(req: NextApiRequest,@@ -24,7 +25,7 @@ export default async function handler(}const userId = (session.user as CustomUser).id;- const team = await prisma?.team.findFirst({+ const team = await prisma.team.findFirst({where: {users: {some: {