Skip to content

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

fix: path for analytics

Marc Seitzcaca07a25ad9
diff --git a/lib/types.ts b/lib/types.ts
index 2b77b108..5f3f07f5 100644
--- a/lib/types.ts
+++ b/lib/types.ts
@@ -112,7 +112,7 @@ export type AnalyticsEvents =
documentId: string;
name: string;
fileSize: string | null | undefined;
- path: string;
+ path: string | undefined;
}
| {
event: "Link Added";
diff --git a/pages/api/documents/index.ts b/pages/api/documents/index.ts
index 951ec6a7..995eeb44 100644
--- a/pages/api/documents/index.ts
+++ b/pages/api/documents/index.ts
@@ -83,7 +83,7 @@ export default async function handle(
documentId: document.id,
name: document.name,
fileSize: null,
- path: req.body.path,
+ path: req.url,
});
res.status(201).json(document);