feat: added learningPaths.ts

This commit is contained in:
Gabriellvl 2025-02-26 23:31:50 +01:00
parent cfaae9ebe4
commit e8e1d94e5b
5 changed files with 193 additions and 8 deletions

View file

@ -0,0 +1,18 @@
import express from "express";
import { getLearningPathsFromIds, getLearningPathsByTheme, getAllLearningPaths, searchLearningPaths } from "../controllers/learningPaths.js";
const router = express.Router();
// Route to fetch learning paths based on a list of HRUIDs
router.get("/", getLearningPathsFromIds);
// Route to fetch all possible learning paths
router.get("/all", getAllLearningPaths);
// Route to fetch learning paths based on a searchterm
router.get("/search", searchLearningPaths);
// Route to fetch learning paths based on a theme
router.get("/theme/:theme", getLearningPathsByTheme);
export default router;