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
+3
View File
@@ -7,6 +7,7 @@ import adminRouter from "./Routes/admin.routes";
import organisationRouter from "./Routes/organisation.routes";
import groupRouter from "./Routes/group.routes";
import disciplineRouter from "./Routes/discipline.routes";
import roleSchemaRouter from "./Routes/role_schema.routes";
import defaultErrorHandler from "./Middleware/error/handler";
import logger from "./Middleware/error/logger";
import debugLogger from "./Middleware/debug/logger";
@@ -56,6 +57,8 @@ async function main() {
app.use("/api/disciplines", disciplineRouter);
app.use("/api/role-schemas", roleSchemaRouter);
// Error handling
app.use(defaultErrorHandler); // Not working