Merge pull request #2044 from abhilakshbansal2001/abhilaksh

Fixed user delete error 500
This commit is contained in:
Mike Cao 2023-06-30 05:45:33 -07:00 committed by GitHub
commit f8ededb31e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -198,9 +198,16 @@ export async function deleteUser(
}),
client.teamUser.deleteMany({
where: {
teamId: {
in: teamIds,
},
OR: [
{
teamId: {
in: teamIds,
},
},
{
userId,
},
],
},
}),
client.team.deleteMany({