Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
feat: add archive check on link if revalidation is slower than user
Marc Seitzfe17d20aced7
diff --git a/pages/api/views.ts b/pages/api/views.tsindex d6bac30b..9b4d7e71 100644--- a/pages/api/views.ts+++ b/pages/api/views.ts@@ -52,6 +52,7 @@ export default async function handle(emailAuthenticated: true,password: true,domainSlug: true,+ isArchived: true,slug: true,allowList: true,denyList: true,@@ -63,6 +64,11 @@ export default async function handle(return;}+ if (link.isArchived) {+ res.status(404).json({ message: "Link is archived." });+ return;+ }+// Check if email is required for visiting the linkif (link.emailProtected) {if (!email || email.trim() === "") {