From e4884686503d5b9b4d502588a954f3ea6867146a Mon Sep 17 00:00:00 2001 From: Gerald Schmittinger Date: Thu, 15 May 2025 20:46:46 +0200 Subject: [PATCH] fix(backend): Fout bij het gebruiken van requireFields opgelost. --- backend/src/controllers/learning-paths.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/src/controllers/learning-paths.ts b/backend/src/controllers/learning-paths.ts index 35a40785..c342306f 100644 --- a/backend/src/controllers/learning-paths.ts +++ b/backend/src/controllers/learning-paths.ts @@ -76,7 +76,9 @@ function postOrPutLearningPath(isPut: boolean): (req: AuthenticatedRequest, res: const path: LearningPath = req.body; const { hruid: hruidParam, language: languageParam } = req.params; - requireFields({ hruidParam, languageParam, path }); + if (isPut) { + requireFields({ hruidParam, languageParam, path }); + } const teacher = await getTeacher(req.auth!.username); if (isPut) {