fix: 2 learning path routes gecombineerd, all en hruid lijst
This commit is contained in:
parent
f7d6cbce65
commit
ae4d76a84b
1 changed files with 9 additions and 9 deletions
|
@ -1,8 +1,7 @@
|
||||||
import express from 'express';
|
import express from 'express';
|
||||||
import {
|
import {
|
||||||
getLearningPathsFromIds,
|
getLearningPaths,
|
||||||
getLearningPathsByTheme,
|
getLearningPathsByTheme,
|
||||||
getAllLearningPaths,
|
|
||||||
searchLearningPaths,
|
searchLearningPaths,
|
||||||
} from '../controllers/learningPaths.js';
|
} from '../controllers/learningPaths.js';
|
||||||
|
|
||||||
|
@ -10,14 +9,15 @@ const router = express.Router();
|
||||||
|
|
||||||
// DWENGO learning paths
|
// DWENGO learning paths
|
||||||
|
|
||||||
// Query: hruids(list), language
|
// Unified route for fetching learning paths
|
||||||
// Route to fetch learning paths based on a list of HRUIDs
|
// Route 1: Query: hruid (list), language
|
||||||
// Example: http://localhost:3000/learningPath?hruids=pn_werking&hruids=art1
|
// Fetch learning paths based on hruid list
|
||||||
router.get('/', getLearningPathsFromIds);
|
// Example 1: http://localhost:3000/learningPath?hruids=pn_werking&hruids=art1
|
||||||
|
|
||||||
// Query: language
|
// Route 2: no query
|
||||||
// Route to fetch all possible learning paths
|
// Fetch all learning paths
|
||||||
router.get('/all', getAllLearningPaths);
|
// Example 2: http://localhost:3000/learningPath (
|
||||||
|
router.get('/', getLearningPaths);
|
||||||
|
|
||||||
// Query: language
|
// Query: language
|
||||||
// Route to fetch learning paths based on a searchterm
|
// Route to fetch learning paths based on a searchterm
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue