Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
chore: sort views in descending order
Marc Seitz3e187e743f7c
diff --git a/pages/api/documents/[id]/links.ts b/pages/api/documents/[id]/links.tsindex f281a6f1..93309daa 100644--- a/pages/api/documents/[id]/links.ts+++ b/pages/api/documents/[id]/links.ts@@ -26,7 +26,11 @@ export default async function handle(createdAt: "asc",},include: {- views: true,+ views: {+ orderBy: {+ viewedAt: "desc",+ }+ },_count: {select: { views: true },},