From 3a995c6b03a9fd74db2dbc450c6d0e058e9cc89e Mon Sep 17 00:00:00 2001 From: Stephan <57194608+stephan418@users.noreply.github.com> Date: Sat, 4 Jun 2022 22:47:25 +0200 Subject: [PATCH] Add route to get participant for role --- src/Routes/participant.routes.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Routes/participant.routes.ts b/src/Routes/participant.routes.ts index aa8f69d..3fc9a8f 100644 --- a/src/Routes/participant.routes.ts +++ b/src/Routes/participant.routes.ts @@ -1,10 +1,12 @@ import express from "express"; import teamRouter from "./team.routes"; +import roleRouter from "./role.routes"; import { createParticipant, deleteParticipant, getAllParticipants, getAllParticipantsParams, + getParticipantForRole, updateParticipant, } from "../Controllers/participant.controller"; import { requireAuthentication, requireConfiguredAuthentication } from "../Middleware/auth/auth"; @@ -25,6 +27,12 @@ teamRouter.get( getAllParticipantsParams ); +roleRouter.get( + "/:rolePid/participant", + requireConfiguredAuthentication({ type: { admin: true, teamleader: true }, optional: false }), + getParticipantForRole +); + teamRouter.post<"/:teamPid/participants/", { teamPid: string }>( "/:teamPid/participants/", requireConfiguredAuthentication({ optional: true, type: { admin: true, teamleader: true } }),