mirror of
https://github.com/detleph/server.git
synced 2026-09-08 07:56:18 +02:00
Add requireResponsibleForGroup
+ Update controllers
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user