chore: refactor find documents

This commit is contained in:
Ephraim Atta-Duncan
2024-06-17 23:19:48 +00:00
committed by Mythie
parent 2837b178fb
commit 754e9e6428
2 changed files with 142 additions and 113 deletions

View File

@ -137,6 +137,15 @@ const handleDocumentOwnerRestore = async ({
}),
});
await tx.recipient.updateMany({
where: {
documentId: document.id,
},
data: {
documentDeletedAt: null,
},
});
return await tx.document.update({
where: {
id: document.id,