Add controller for roleSchemas (unfinished)

+ Refine error messages for role schemas
+ Add role schema routes
+ Add RESULT_SCHEMA DataType
+ Add SchemaError.isSchemaError() type guard
This commit is contained in:
Stephan
2022-05-01 18:18:48 +02:00
parent 72ee918f00
commit 8384a3eebb
6 changed files with 154 additions and 2 deletions
+19
View File
@@ -0,0 +1,19 @@
import express from "express";
import disciplineRouter from "./discipline.routes";
import {
createRoleSchema,
getAllRoleSchemas,
getAllRoleSchemasWithParam,
getRoleSchema,
} from "../Controllers/role_schema.controller";
import { requireAuthentication } from "../Middleware/auth/auth";
const router = express.Router();
router.get("/", getAllRoleSchemas);
router.get("/:pid", getRoleSchema);
disciplineRouter.get("/:disciplinePid/role-schemas", getAllRoleSchemasWithParam);
disciplineRouter.post("/:disciplinePid/role-schemas", requireAuthentication, createRoleSchema);
export default router;