Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

fix: return error if link is archived

Marc Seitzd2361da0511b
diff --git a/pages/api/links/[id]/index.ts b/pages/api/links/[id]/index.ts
index 20d0cec2..721d9aff 100644
--- a/pages/api/links/[id]/index.ts
+++ b/pages/api/links/[id]/index.ts
@@ -61,6 +61,10 @@ export default async function handle(
return res.status(404).json({ error: "Link not found" });
}
+ if (link.isArchived) {
+ return res.status(404).json({ error: "Link is archived" });
+ }
+
let brand = await prisma.brand.findFirst({
where: {
teamId: link.document.teamId!,