From ae4d76a84b415d255be9943d73c97f119ccd2776 Mon Sep 17 00:00:00 2001 From: Gabriellvl Date: Sat, 1 Mar 2025 17:54:29 +0100 Subject: [PATCH] fix: 2 learning path routes gecombineerd, all en hruid lijst --- backend/src/routes/learningPaths.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/backend/src/routes/learningPaths.ts b/backend/src/routes/learningPaths.ts index 17eb881d..e196c0d3 100644 --- a/backend/src/routes/learningPaths.ts +++ b/backend/src/routes/learningPaths.ts @@ -1,8 +1,7 @@ import express from 'express'; import { - getLearningPathsFromIds, + getLearningPaths, getLearningPathsByTheme, - getAllLearningPaths, searchLearningPaths, } from '../controllers/learningPaths.js'; @@ -10,14 +9,15 @@ const router = express.Router(); // DWENGO learning paths -// 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); +// Unified route for fetching learning paths +// Route 1: Query: hruid (list), language +// Fetch learning paths based on hruid list +// Example 1: http://localhost:3000/learningPath?hruids=pn_werking&hruids=art1 -// Query: language -// Route to fetch all possible learning paths -router.get('/all', getAllLearningPaths); +// Route 2: no query +// Fetch all learning paths +// Example 2: http://localhost:3000/learningPath ( +router.get('/', getLearningPaths); // Query: language // Route to fetch learning paths based on a searchterm