fix: example urls bij learningPaths.ts
This commit is contained in:
parent
acfffda82d
commit
594aa540dd
3 changed files with 118 additions and 3 deletions
|
@ -25,7 +25,6 @@ function loadTranslations(language: string): Translations {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
export function getThemes(req: Request, res: Response) {
|
||||
const language = (req.query.language as string)?.toLowerCase() || 'nl';
|
||||
const translations = loadTranslations(language);
|
||||
|
@ -43,7 +42,6 @@ export function getThemes(req: Request, res: Response) {
|
|||
res.json(themeList);
|
||||
}
|
||||
|
||||
|
||||
export function getThemeByTitle(req: Request, res: Response) {
|
||||
const themeKey = req.params.theme;
|
||||
const theme = themes.find((t) => {
|
||||
|
|
|
@ -8,8 +8,9 @@ import {
|
|||
|
||||
const router = express.Router();
|
||||
|
||||
// Query: language
|
||||
// Query: hruids(list), language
|
||||
// Route to fetch learning paths based on a list of HRUIDs
|
||||
// Example: http://localhost:3000/learningPath?hruids=pn_werking&hruids=art1
|
||||
router.get('/', getLearningPathsFromIds);
|
||||
|
||||
// Query: language
|
||||
|
@ -18,11 +19,13 @@ router.get('/all', getAllLearningPaths);
|
|||
|
||||
// Query: language
|
||||
// Route to fetch learning paths based on a searchterm
|
||||
// Example: http://localhost:3000/learningPath/search?query=robot
|
||||
router.get('/search', searchLearningPaths);
|
||||
|
||||
// Arg: theme id
|
||||
// Query: language
|
||||
// Route to fetch learning paths based on a theme
|
||||
// Example: http://localhost:3000/learningPath/theme/kiks
|
||||
router.get('/theme/:theme', getLearningPathsByTheme);
|
||||
|
||||
export default router;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue