Skip to content

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

fix: paused empty return

Marc Seitza0e695900b0d
diff --git a/pages/api/teams/[teamId]/links/[id]/visits.ts b/pages/api/teams/[teamId]/links/[id]/visits.ts
index 95f775e3..1c70a441 100644
--- a/pages/api/teams/[teamId]/links/[id]/visits.ts
+++ b/pages/api/teams/[teamId]/links/[id]/visits.ts
@@ -71,9 +71,9 @@ export default async function handle(
},
});
- // If link doesn't exist (deleted), return empty array
+ // If link doesn't exist (deleted), return empty response
if (!result || !result.document || result.deletedAt) {
- return res.status(200).json([]);
+ return res.status(200).json({ views: [], hiddenFromPause: 0 });
}
const docId = result.document.id;