From 55eab7000a1d50cdf6a70a43e3eb82ee647c5d51 Mon Sep 17 00:00:00 2001 From: Laurin <60652077+Flexla54@users.noreply.github.com> Date: Sat, 28 May 2022 16:52:35 +0200 Subject: [PATCH] add deleteRolesFromTeam --- src/Controllers/role.controller.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Controllers/role.controller.ts b/src/Controllers/role.controller.ts index 63721fe..a326a3e 100644 --- a/src/Controllers/role.controller.ts +++ b/src/Controllers/role.controller.ts @@ -93,3 +93,9 @@ export async function assignParticipantToRole(req: Request<{ pid: string }>, res }, }); } + +export async function deleteRolesFromTeam(teamPid: string){ + await prisma.role.deleteMany({ + where: { team: { pid: teamPid, } } + }); +} \ No newline at end of file