chore: don't return more than necessary

This commit is contained in:
Catalin Pit
2025-09-01 13:56:21 +03:00
parent 38483bb88c
commit 1863d990c8

View File

@ -34,7 +34,11 @@ export const handleDocumentOwnershipOnDeletion = async ({
include: {
ownedOrganisations: {
include: {
teams: true,
teams: {
select: {
id: true,
},
},
},
},
},
@ -49,7 +53,7 @@ export const handleDocumentOwnershipOnDeletion = async ({
in: documentIds,
},
status: {
not: DocumentStatus.DRAFT,
in: [DocumentStatus.PENDING, DocumentStatus.REJECTED, DocumentStatus.COMPLETED],
},
},
data: {
@ -65,7 +69,7 @@ export const handleDocumentOwnershipOnDeletion = async ({
in: documentIds,
},
status: {
not: DocumentStatus.DRAFT,
in: [DocumentStatus.PENDING, DocumentStatus.REJECTED, DocumentStatus.COMPLETED],
},
},
data: {