mirror of
https://github.com/detleph/server.git
synced 2026-09-06 16:06:18 +02:00
Add function to create disciplines
+ Fix async errors + Extract name error
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
import express from "express";
|
||||
import { getAllDisciplines, getDiscipline } from "../Controllers/discipline.controller";
|
||||
import eventRouter from "./event.routes";
|
||||
import { createDiscipline, getAllDisciplines, getDiscipline } from "../Controllers/discipline.controller";
|
||||
import { requireAuthentication } from "../Middleware/auth/auth";
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
router.get("/", getAllDisciplines); // TODO: Optional auth
|
||||
router.get("/:pid", getDiscipline);
|
||||
|
||||
eventRouter.post("/:eventPid/disciplines", requireAuthentication, createDiscipline);
|
||||
|
||||
export default router;
|
||||
|
||||
Reference in New Issue
Block a user