Improve validation and error handling

+ Check code and routes
+ Comment code
This commit is contained in:
Stephan
2022-05-29 13:25:11 +02:00
parent c41bbe9ab4
commit 197fd9c654
4 changed files with 27 additions and 67 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ import { assignParticipantToRole, getRolesForTeam } from "../Controllers/role.co
const router = Express.Router();
//TO DO: maybe transfer getRolesForTeam to team router
//TO DO: maybe transfer getRolesForTeam to team router -> Seconded
router.get<"team/:teamPid/", { teamPid: string }>("team/:teamPid/", getRolesForTeam);
router.patch<"/:pid/", { pid: string }>("/:pid/", assignParticipantToRole)
router.put<"/:pid/participant", { pid: string }>("/:pid/participant", assignParticipantToRole);