mirror of
https://github.com/documenso/documenso.git
synced 2025-11-15 17:21:41 +10:00
fix: add recipients filter for bin
This commit is contained in:
committed by
Mythie
parent
feef4b1a12
commit
ea63b45a13
@ -168,9 +168,24 @@ export const findDocuments = async ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (status === ExtendedDocumentStatus.BIN) {
|
if (status === ExtendedDocumentStatus.BIN) {
|
||||||
whereClause.deletedAt = {
|
whereClause.OR = [
|
||||||
gte: DateTime.now().minus({ days: 30 }).startOf('day').toJSDate(),
|
{
|
||||||
};
|
userId: user.id,
|
||||||
|
deletedAt: {
|
||||||
|
gte: DateTime.now().minus({ days: 30 }).startOf('day').toJSDate(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Recipient: {
|
||||||
|
some: {
|
||||||
|
email: user.email,
|
||||||
|
documentDeletedAt: {
|
||||||
|
gte: DateTime.now().minus({ days: 30 }).startOf('day').toJSDate(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (senderIds && senderIds.length > 0) {
|
if (senderIds && senderIds.length > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user