Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
Fix eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
msathieu committed May 21, 2024
1 parent c56b6ed commit 04bc967
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions frontend/src/dataloaders/ProjectsStudentLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ export async function loadGroupMembers(project_id: number) {
return undefined
}
const groupMembersApi = groupMembersData.content
const groupMembers = await Promise.all(groupMembersApi.map(async (user) => {
const groupMembers = groupMembersApi.map((user) => {
return {
name: user.name,
email: user.email,
lastSubmission: user.id == lastSubmissionId
}
}))
})
return {members: groupMembers, id: groupId, submission: submission}
}

Expand Down Expand Up @@ -125,11 +125,9 @@ export async function LoadProjectsForStudent(filter_on_current: boolean = false,
const all_groupMemberInfo: (groupInfo | undefined)[] = (await Promise.all(groupBackendMembersPromises));
const groupMemberInfo: groupInfo[] = all_groupMemberInfo.filter(gmi => gmi !== undefined) as groupInfo[]
const groupMembersPromises: Promise<groupInfo | undefined>[] = groupMemberInfo.map(async (groupinfo) => {

Check failure on line 127 in frontend/src/dataloaders/ProjectsStudentLoader.ts

View workflow job for this annotation

GitHub Actions / lint

Async arrow function has no 'await' expression
const memberPromises: Promise<User | undefined>[] = groupinfo.members.map(async (member) => {
const all_users: User[] = groupinfo.members.map((member) => {
return mapUser(member);
});

const all_users: (User | undefined)[] = (await Promise.all(memberPromises));
const users: User[] = all_users.filter(user => user != undefined) as User[]

Check failure on line 131 in frontend/src/dataloaders/ProjectsStudentLoader.ts

View workflow job for this annotation

GitHub Actions / lint

This assertion is unnecessary since it does not change the type of the expression
return {
group_id: groupinfo.group_id,
Expand Down

0 comments on commit 04bc967

Please sign in to comment.