fix(backend): Fout bij het gebruiken van requireFields opgelost.

This commit is contained in:
Gerald Schmittinger 2025-05-15 20:46:46 +02:00
parent f73d277687
commit e488468650

View file

@ -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) {