mirror of
https://github.com/detleph/server.git
synced 2026-09-09 07:56:18 +02:00
patched issues found during testing
This commit is contained in:
@@ -1,11 +1,22 @@
|
||||
import Express from "express";
|
||||
import { assignParticipantToRole, getRolesForTeam } from "../Controllers/role.controller";
|
||||
import { requireAuthentication, 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/", getRolesForTeam);
|
||||
router.get<"team/:teamPid/", { teamPid: string }>(
|
||||
"team/:teamPid/",
|
||||
requireAuthentication,
|
||||
requireConfiguredAuthentication({ optional: true, type: { admin: true, teamleader: true } }),
|
||||
getRolesForTeam
|
||||
);
|
||||
|
||||
router.put<"/:pid/participant", { pid: string }>("/:pid/participant", assignParticipantToRole);
|
||||
router.put<"/:pid/participant", { pid: string }>(
|
||||
"/:pid/participant",
|
||||
requireAuthentication,
|
||||
requireConfiguredAuthentication({ optional: true, type: { admin: true, teamleader: true } }),
|
||||
assignParticipantToRole
|
||||
);
|
||||
|
||||
export default router;
|
||||
|
||||
Reference in New Issue
Block a user