Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
feat: add document api link
Marc Seitze457149c1c19
diff --git a/pages/api/links/[id]/documents/[documentId].ts b/pages/api/links/[id]/documents/[documentId].tsindex 31c9f8d8..60fe0cd2 100644--- a/pages/api/links/[id]/documents/[documentId].ts+++ b/pages/api/links/[id]/documents/[documentId].ts@@ -35,6 +35,7 @@ export default async function handle(enableScreenshotProtection: true,password: true,isArchived: true,+ deletedAt: true,enableCustomMetatag: true,metaTitle: true,metaDescription: true,@@ -86,6 +87,10 @@ export default async function handle(return res.status(404).json({ error: "Link not found" });}+ if (link.deletedAt) {+ return res.status(404).json({ error: "Link has been deleted" });+ }+if (link.isArchived) {return res.status(404).json({ error: "Link is archived" });}