mirror of
https://github.com/detleph/server.git
synced 2026-09-04 08:36:06 +02:00
adding team router/cont and participant router
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import express from "express";
|
||||
import teamRouter from "./team.routes";
|
||||
import { createParticipant, deleteParticipant, updateParticipant } from "../Controllers/participant.controller";
|
||||
import { requireAuthentication } from "../Middleware/auth/auth";
|
||||
import { requireTeamleaderAuthentication } from "../Middleware/auth/teamleaderAuth";
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
teamRouter.post<"/:pid/participant/", { pid: string }>(
|
||||
"/:pid/participant/",
|
||||
requireAuthentication,
|
||||
requireTeamleaderAuthentication,
|
||||
createParticipant
|
||||
);
|
||||
|
||||
teamRouter.patch<"/:pid/participant/", { pid: string }>(
|
||||
"/:pid/participant/",
|
||||
requireAuthentication,
|
||||
requireTeamleaderAuthentication,
|
||||
updateParticipant
|
||||
);
|
||||
|
||||
teamRouter.delete<"/:pid/participant/", { pid: string }>(
|
||||
"/:pid/participant/",
|
||||
requireAuthentication,
|
||||
requireTeamleaderAuthentication,
|
||||
deleteParticipant
|
||||
);
|
||||
|
||||
export default router;
|
||||
Reference in New Issue
Block a user