Skip to content

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

Merge branch 'main' into feat/pause-limits

Marc Seitz82aae19592e9
diff --cc pages/api/webhooks/services/[...path]/index.ts
index 46515223,d690a46f..f888c319
--- a/pages/api/webhooks/services/[...path]/index.ts
+++ b/pages/api/webhooks/services/[...path]/index.ts
@@@ -231,18 -242,17 +243,26 @@@ async function handleDocumentCreate
token: string,
res: NextApiResponse,
) {
- const { fileUrl, name, contentType, dataroomId, createLink, link, folderId } =
- data;
+ const {
+ fileUrl,
+ name,
+ contentType,
+ dataroomId,
+ createLink,
+ link,
+ folderId,
+ dataroomFolderId,
+ } = data;
+ // Check if team is paused
+ const teamIsPaused = await isTeamPausedById(teamId);
+ if (teamIsPaused) {
+ return res.status(403).json({
+ error:
+ "Team is currently paused. New document uploads are not available.",
+ });
+ }
+
// Check if the content type is supported
const supportedContentType = getSupportedContentType(contentType);
if (!supportedContentType) {