style: fix linting issues met Prettier
This commit is contained in:
		
							parent
							
								
									eae4ad3978
								
							
						
					
					
						commit
						97d3c5c480
					
				
					 2 changed files with 9 additions and 14 deletions
				
			
		|  | @ -16,14 +16,14 @@ const logger: Logger = getLogger(); | |||
|  */ | ||||
| async function addProgressToLearningPath(learningPath: LearningPath, personalizedFor: Group): Promise<LearningPath> { | ||||
|     await Promise.all( | ||||
|         learningPath.nodes.map(async node => { | ||||
|             const lastSubmission = personalizedFor ? await getLastSubmissionForGroup(idFromLearningObjectNode(node), personalizedFor) : null | ||||
|         learningPath.nodes.map(async (node) => { | ||||
|             const lastSubmission = personalizedFor ? await getLastSubmissionForGroup(idFromLearningObjectNode(node), personalizedFor) : null; | ||||
|             node.done = Boolean(lastSubmission); | ||||
|         }) | ||||
|     ); | ||||
| 
 | ||||
|     learningPath.num_nodes = learningPath.nodes.length; | ||||
|     learningPath.num_nodes_left = learningPath.nodes.filter(it => !it.done).length; | ||||
|     learningPath.num_nodes_left = learningPath.nodes.filter((it) => !it.done).length; | ||||
| 
 | ||||
|     return learningPath; | ||||
| } | ||||
|  | @ -54,9 +54,7 @@ const dwengoApiLearningPathProvider: LearningPathProvider = { | |||
|             }; | ||||
|         } | ||||
| 
 | ||||
|         await Promise.all( | ||||
|             learningPaths?.map(async it => addProgressToLearningPath(it, personalizedFor)) | ||||
|         ); | ||||
|         await Promise.all(learningPaths?.map(async (it) => addProgressToLearningPath(it, personalizedFor))); | ||||
| 
 | ||||
|         return { | ||||
|             success: true, | ||||
|  | @ -71,12 +69,9 @@ const dwengoApiLearningPathProvider: LearningPathProvider = { | |||
|         const searchResults = await fetchWithLogging<LearningPath[]>(apiUrl, `Search learning paths with query "${query}"`, { params }); | ||||
| 
 | ||||
|         if (searchResults) { | ||||
|             await Promise.all( | ||||
|                 searchResults?.map(async it => addProgressToLearningPath(it, personalizedFor)) | ||||
|             ); | ||||
|             await Promise.all(searchResults?.map(async (it) => addProgressToLearningPath(it, personalizedFor))); | ||||
|         } | ||||
| 
 | ||||
| 
 | ||||
|         return searchResults ?? []; | ||||
|     }, | ||||
| }; | ||||
|  |  | |||
|  | @ -22,8 +22,8 @@ export function idFromLearningObjectNode(node: LearningObjectNode): LearningObje | |||
|     return { | ||||
|         hruid: node.learningobject_hruid, | ||||
|         language: node.language, | ||||
|         version: node.version | ||||
|     } | ||||
|         version: node.version, | ||||
|     }; | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  | @ -33,8 +33,8 @@ export function idFromLearningPathNode(node: LearningPathNode): LearningObjectId | |||
|     return { | ||||
|         hruid: node.learningObjectHruid, | ||||
|         language: node.language, | ||||
|         version: node.version | ||||
|     } | ||||
|         version: node.version, | ||||
|     }; | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  |  | |||
		Reference in a new issue
	
	 Lint Action
						Lint Action