fix: undefined | string/number types
This commit is contained in:
		
							parent
							
								
									a6a34071de
								
							
						
					
					
						commit
						219226148d
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		|  | @ -51,8 +51,7 @@ export async function fetchStudent(username: string): Promise<Student> { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| export async function fetchStudents(usernames: string[]): Promise<Student[]> { | export async function fetchStudents(usernames: string[]): Promise<Student[]> { | ||||||
|     const members = await Promise.all(usernames.map(async (username) => await fetchStudent(username))); |     return await Promise.all(usernames.map(async (username) => await fetchStudent(username))); | ||||||
|     return members; |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| export async function getStudent(username: string): Promise<StudentDTO> { | export async function getStudent(username: string): Promise<StudentDTO> { | ||||||
|  | @ -105,7 +104,7 @@ export async function getStudentAssignments(username: string, full: boolean): Pr | ||||||
| 
 | 
 | ||||||
|     const groupRepository = getGroupRepository(); |     const groupRepository = getGroupRepository(); | ||||||
|     const groups = await groupRepository.findAllGroupsWithStudent(student); |     const groups = await groupRepository.findAllGroupsWithStudent(student); | ||||||
|     const assignments = await Promise.all(groups.map(async (group) => await fetchAssignment(group.assignment.within.classId, group.assignment.id))); |     const assignments = await Promise.all(groups.map(async (group) => await fetchAssignment(group.assignment.within.classId!, group.assignment.id!))); | ||||||
| 
 | 
 | ||||||
|     if (full) { |     if (full) { | ||||||
|         return assignments.map(mapToAssignmentDTO); |         return assignments.map(mapToAssignmentDTO); | ||||||
|  |  | ||||||
		Reference in a new issue
	
	 Gabriellvl
						Gabriellvl