mirror of
https://github.com/detleph/server.git
synced 2026-09-06 23:44:26 +02:00
Add routes for organisations
+ FIX: Change eventId type
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import express from "express";
|
||||
import eventRouter from "./event.routes";
|
||||
import {
|
||||
createOrganisation,
|
||||
getAllOrganisations,
|
||||
getAllOrganisationsWithParam,
|
||||
getOrganisation,
|
||||
} from "../Controllers/organisation.controller";
|
||||
import { requireAuthentication } from "../Middleware/auth/auth";
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
router.get("/", getAllOrganisations);
|
||||
router.get("/:pid", getOrganisation);
|
||||
|
||||
eventRouter.get("/:eventPid/organisations", getAllOrganisationsWithParam);
|
||||
eventRouter.post<"/:eventPid/organisations", { eventPid: string }>(
|
||||
"/:eventPid/organisations",
|
||||
requireAuthentication,
|
||||
createOrganisation
|
||||
);
|
||||
|
||||
export default router;
|
||||
Reference in New Issue
Block a user