UNPKG

@defikitdotnet/education-module-ai

Version:
21 lines (20 loc) 884 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createH5PRoutes = createH5PRoutes; var express_1 = require("express"); var H5PContentController_1 = require("../controllers/H5PContentController"); /** * Create and configure H5P content routes */ function createH5PRoutes() { var router = (0, express_1.Router)(); // Create controller var h5pContentController = new H5PContentController_1.H5PContentController(); // Public routes for accessing content router.get("/content", h5pContentController.getAllContent); router.get("/content/:id", h5pContentController.getContentById); router.get("/content/:id/:filename", h5pContentController.serveContentFile); // Admin routes for managing content (protected by authentication) // Add admin routes here when needed, like uploading new H5P content return router; }