mirror of
https://github.com/detleph/server.git
synced 2026-09-07 16:06:18 +02:00
Extract function to create an object by name
+ Add route to create groups
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import express from "express";
|
||||
import { getAllGroups, getAllGroupsWithParam, getGroup } from "../Controllers/group.controllers";
|
||||
import { createGroup, getAllGroups, getAllGroupsWithParam, getGroup } from "../Controllers/group.controllers";
|
||||
import { requireAuthentication } from "../Middleware/auth/auth";
|
||||
import organisationRouter from "./organisation.routes";
|
||||
|
||||
const router = express.Router();
|
||||
@@ -8,5 +9,6 @@ router.get("/", getAllGroups);
|
||||
router.get("/:pid", getGroup);
|
||||
|
||||
organisationRouter.get("/:organisationPid/groups", getAllGroupsWithParam);
|
||||
organisationRouter.post("/:organisationPid/groups", requireAuthentication, createGroup);
|
||||
|
||||
export default router;
|
||||
|
||||
Reference in New Issue
Block a user