Add requireResponsibleForGroup

+ Update controllers
This commit is contained in:
Stephan
2022-05-29 14:47:32 +02:00
parent 197fd9c654
commit cd0cb00106
5 changed files with 20 additions and 5 deletions
+2
View File
@@ -5,6 +5,7 @@ import {
getAllGroups,
getAllGroupsWithParam,
getGroup,
updateGroup,
} from "../Controllers/group.controllers";
import { requireAuthentication } from "../Middleware/auth/auth";
import organisationRouter from "./organisation.routes";
@@ -14,6 +15,7 @@ const router = express.Router();
router.get("/", getAllGroups);
router.get("/:pid", getGroup);
router.delete<"/:pid", { pid: string }>("/:pid", requireAuthentication, deleteGroup);
router.patch("/:pid", requireAuthentication, updateGroup);
organisationRouter.get("/:organisationPid/groups", getAllGroupsWithParam);
organisationRouter.post("/:organisationPid/groups", requireAuthentication, createGroup);