Fixed team user delete.

This commit is contained in:
Mike Cao 2024-01-25 23:53:50 -08:00
parent a226114374
commit c6e52c247c
1 changed files with 7 additions and 9 deletions

View File

@ -65,16 +65,14 @@ export async function updateTeamUser(
}
export async function deleteTeamUser(teamId: string, userId: string): Promise<TeamUser> {
const { client, transaction } = prisma;
const { client } = prisma;
return transaction([
client.teamUser.deleteMany({
where: {
teamId,
userId,
},
}),
]);
return client.teamUser.deleteMany({
where: {
teamId,
userId,
},
});
}
export async function deleteTeamUserByUserId(