feat: unlink documents from deleted organization

This commit is contained in:
Catalin Pit
2025-08-28 09:35:31 +03:00
parent 7d257236a6
commit 8b131e42c7
2 changed files with 96 additions and 0 deletions

View File

@ -5,6 +5,20 @@ export const deletedAccountServiceAccount = async () => {
where: {
email: 'deleted-account@documenso.com',
},
select: {
id: true,
email: true,
ownedOrganisations: {
select: {
id: true,
teams: {
select: {
id: true,
},
},
},
},
},
});
if (!serviceAccount) {