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.
This commit is contained in:
ephraimduncan
2026-05-28 23:35:47 +00:00
parent e98b37bb10
commit 12986f5afa
@@ -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,
}),
]);