Skip to content

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

fix: document upload not revalidating links

Marc Seitzad295e5be7f7
diff --git a/pages/api/revalidate.ts b/pages/api/revalidate.ts
index fe774836..7293c897 100644
--- a/pages/api/revalidate.ts
+++ b/pages/api/revalidate.ts
@@ -54,6 +54,7 @@ export default async function handler(
select: { id: true },
});
for (const link of links) {
+ console.log("revalidating document link", `/view/${link.id}`);
await res.revalidate(`/view/${link.id}`);
}
}
diff --git a/pages/api/teams/[teamId]/documents/index.ts b/pages/api/teams/[teamId]/documents/index.ts
index e04f2b1a..a9ca65ad 100644
--- a/pages/api/teams/[teamId]/documents/index.ts
+++ b/pages/api/teams/[teamId]/documents/index.ts
@@ -158,6 +158,7 @@ export default async function handle(
payload: {
documentVersionId: document.versions[0].id,
teamId: teamId,
+ documentId: document.id,
},
});
}