patched requireLeaderOfTeam usecases

This commit is contained in:
Laurin
2022-06-05 03:35:37 +02:00
parent 619b46a6aa
commit 1d2794c75c
5 changed files with 61 additions and 27 deletions
+1 -8
View File
@@ -4,17 +4,10 @@ import { requireConfiguredAuthentication } from "../Middleware/auth/auth";
const router = Express.Router();
//TO DO: maybe transfer getRolesForTeam to team router -> Seconded
router.get<"team/:teamPid/", { teamPid: string }>(
"team/:teamPid/",
requireConfiguredAuthentication({ optional: false, type: { admin: true, teamleader: true } }),
getRolesForTeam
);
router.put<"/:pid/participant", { pid: string }>(
"/:pid/participant",
requireConfiguredAuthentication({ optional: false, type: { admin: true, teamleader: true } }),
assignParticipantToRole
);
export default router;
export default router;