mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 07:37:11 +01:00
Hook up teamMemberDelete and teamDelete.
This commit is contained in:
parent
c3426a67ee
commit
701bde53b7
7 changed files with 150 additions and 21 deletions
|
|
@ -52,17 +52,17 @@ export async function updateTeam(
|
|||
export async function deleteTeam(
|
||||
teamId: string,
|
||||
): Promise<Promise<[Prisma.BatchPayload, Prisma.BatchPayload, Team]>> {
|
||||
const { client } = prisma;
|
||||
const { client, transaction } = prisma;
|
||||
|
||||
return prisma.transaction([
|
||||
return transaction([
|
||||
client.teamWebsite.deleteMany({
|
||||
where: {
|
||||
id: teamId,
|
||||
teamId,
|
||||
},
|
||||
}),
|
||||
client.teamUser.deleteMany({
|
||||
where: {
|
||||
id: teamId,
|
||||
teamId,
|
||||
},
|
||||
}),
|
||||
client.team.delete({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue