From 12986f5afa999cb424fa198e0665f35a6ce7b458 Mon Sep 17 00:00:00 2001 From: ephraimduncan Date: Thu, 28 May 2026 23:35:47 +0000 Subject: [PATCH] fix: forward hasExpiredRecipients in internal documents route `findDocumentsInternal` inherits `hasExpiredRecipients` from `ZFindDocumentsRequestSchema` but the handler did not destructure or forward it to `findDocuments`, so callers requesting the filter received unfiltered results. Destructure the field from input and pass it through, matching the public `findDocuments` route. --- packages/trpc/server/document-router/find-documents-internal.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/trpc/server/document-router/find-documents-internal.ts b/packages/trpc/server/document-router/find-documents-internal.ts index ff31b882d..5503e3a0b 100644 --- a/packages/trpc/server/document-router/find-documents-internal.ts +++ b/packages/trpc/server/document-router/find-documents-internal.ts @@ -23,6 +23,7 @@ export const findDocumentsInternalRoute = authenticatedProcedure orderByColumn, source, status, + hasExpiredRecipients, period, senderIds, folderId, @@ -49,6 +50,7 @@ export const findDocumentsInternalRoute = authenticatedProcedure period, senderIds, folderId, + hasExpiredRecipients, orderBy: orderByColumn ? { column: orderByColumn, direction: orderByDirection } : undefined, }), ]);