fix: werkende aan 183 fix ([] vervangen door Collection<> in group en assignment)

This commit is contained in:
Adriaan Jacquet 2025-04-12 16:38:16 +02:00
parent 69659426de
commit c4729156ba
6 changed files with 38 additions and 24 deletions

View file

@ -66,15 +66,22 @@ export async function createGroup(groupData: GroupDTO, classid: string, assignme
(student) => student !== null
);
console.log(members);
const assignment = await fetchAssignment(classid, assignmentNumber);
console.log(assignment);
const groupRepository = getGroupRepository();
const newGroup = groupRepository.create({
assignment: assignment,
members: members,
});
console.log(newGroup.assignment);
await groupRepository.save(newGroup);
console.log(newGroup.assignment);
return mapToGroupDTO(newGroup);
}