refactor(backend): Functions
This commit is contained in:
parent
5ec62554e3
commit
65c1a5e6b6
57 changed files with 172 additions and 117 deletions
|
@ -43,7 +43,9 @@ export async function createGroup(groupData: GroupDTO, classid: string, assignme
|
|||
const studentRepository = getStudentRepository();
|
||||
|
||||
const memberUsernames = (groupData.members as string[]) || []; // TODO check if groupdata.members is a list
|
||||
const members = (await Promise.all([...memberUsernames].map((id) => studentRepository.findByUsername(id)))).filter((student) => student != null);
|
||||
const members = (await Promise.all([...memberUsernames].map(async (id) => studentRepository.findByUsername(id)))).filter(
|
||||
(student) => student != null
|
||||
);
|
||||
|
||||
getLogger().debug(members);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue