feat(backend): Added endpoint to fetch HTML version of learning object (from Dwengo backend)
Also refactored a bit to make this easier.
This commit is contained in:
parent
770c5c9879
commit
18ee991ce3
16 changed files with 264 additions and 178 deletions
27
backend/src/routes/learning-paths.ts
Normal file
27
backend/src/routes/learning-paths.ts
Normal file
|
@ -0,0 +1,27 @@
|
|||
import express from 'express';
|
||||
import { getLearningPaths } from '../controllers/learning-paths.js';
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
// DWENGO learning paths
|
||||
|
||||
// Route 1: no query
|
||||
// Fetch all learning paths
|
||||
// Example 1: http://localhost:3000/learningPath
|
||||
|
||||
// Unified route for fetching learning paths
|
||||
// Route 2: Query: hruid (list), language
|
||||
// Fetch learning paths based on hruid list
|
||||
// Example 2: http://localhost:3000/learningPath?hruid=pn_werking&hruid=art1
|
||||
|
||||
// Query: search, language
|
||||
// Route to fetch learning paths based on a searchterm
|
||||
// Example 3: http://localhost:3000/learningPath?search=robot
|
||||
|
||||
// Query: theme, anguage
|
||||
// Route to fetch learning paths based on a theme
|
||||
// Example: http://localhost:3000/learningPath?theme=kiks
|
||||
|
||||
router.get('/', getLearningPaths);
|
||||
|
||||
export default router;
|
Loading…
Add table
Add a link
Reference in a new issue