fix(backend): Commentaar in PR geaddresseerd.
This commit is contained in:
		
							parent
							
								
									e3e6a03003
								
							
						
					
					
						commit
						699ebf62b8
					
				
					 2 changed files with 7 additions and 6 deletions
				
			
		|  | @ -65,14 +65,15 @@ async function fetchLearningObjects(learningPathId: LearningPathIdentifier, full | |||
|             return nodes.map((node) => node.learningobject_hruid); | ||||
|         } | ||||
| 
 | ||||
|         return await Promise.all( | ||||
|         const objects = await Promise.all( | ||||
|             nodes.map(async (node) => | ||||
|                 dwengoApiLearningObjectProvider.getLearningObjectById({ | ||||
|                     hruid: node.learningobject_hruid, | ||||
|                     language: learningPathId.language, | ||||
|                 }) | ||||
|             ) | ||||
|         ).then((objects) => objects.filter((obj): obj is FilteredLearningObject => obj !== null)); | ||||
|         ); | ||||
|         return objects.filter((obj): obj is FilteredLearningObject => obj !== null); | ||||
|     } catch (error) { | ||||
|         logger.error('❌ Error fetching learning objects:', error); | ||||
|         return []; | ||||
|  |  | |||
		Reference in a new issue
	
	 Gerald Schmittinger
						Gerald Schmittinger