mirror of
https://github.com/detleph/server.git
synced 2026-09-08 16:06:19 +02:00
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:
@@ -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;
|
||||
Reference in New Issue
Block a user