mirror of
https://github.com/detleph/server.git
synced 2026-09-09 16:06:21 +02:00
Added basic implementation of media
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import express from "express";
|
||||
import disciplineRouter from "./discipline.routes";
|
||||
import {
|
||||
addVisual,
|
||||
createRoleSchema,
|
||||
deleteVisual,
|
||||
getAllRoleSchemas,
|
||||
getAllRoleSchemasWithParam,
|
||||
getRoleSchema,
|
||||
@@ -11,9 +13,16 @@ 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);
|
||||
|
||||
router.post<"/:schemaPid/images", {schemaPid: string}>("/:schemaPid/images", requireAuthentication, addVisual);
|
||||
|
||||
router.delete<"/:schemaPid/images/:pid", {schemaPid: string, pid: string}>("/:schemaPid/images/:pid", requireAuthentication, deleteVisual);
|
||||
|
||||
|
||||
export default router;
|
||||
|
||||
Reference in New Issue
Block a user