Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
fix
Marc Seitz68d714dc95e9
diff --git a/pages/api/teams/[teamId]/documents/[id]/annotations/index.ts b/pages/api/teams/[teamId]/documents/[id]/annotations/index.tsindex ca4794b9..2fa2871c 100644--- a/pages/api/teams/[teamId]/documents/[id]/annotations/index.ts+++ b/pages/api/teams/[teamId]/documents/[id]/annotations/index.ts@@ -5,7 +5,7 @@ import { getServerSession } from "next-auth/next";import { z } from "zod";import { errorhandler } from "@/lib/errorHandler";-import prisma from "@/lib/prisma";+import prisma, { Prisma } from "@/lib/prisma";import { getTeamWithUsersAndDocument } from "@/lib/team/helper";import { CustomUser } from "@/lib/types";import { log } from "@/lib/utils";@@ -81,6 +81,7 @@ export default async function handle(const annotation = await prisma.documentAnnotation.create({data: {...validatedData,+ content: validatedData.content ?? Prisma.JsonNull, // Convert undefined to Prisma.JsonNulldocumentId: docId,teamId,createdById: userId,