fix+feat: error bij het toevegoen van groups na het aanmaken van een assignment gefixt, group & assignment DTO Id toegevoegd
This commit is contained in:
parent
0ceb6761d7
commit
e3fc4b72a7
8 changed files with 53 additions and 50 deletions
|
@ -4,10 +4,10 @@ import { Class } from '../../entities/classes/class.entity.js';
|
|||
|
||||
export class AssignmentRepository extends DwengoEntityRepository<Assignment> {
|
||||
public async findByClassAndId(within: Class, id: number): Promise<Assignment | null> {
|
||||
return this.findOne({ within: within, id: id }, { populate: [ "groups" ]});
|
||||
return this.findOne({ within: within, id: id }, { populate: [ "groups", "groups.members" ]});
|
||||
}
|
||||
public async findAllAssignmentsInClass(within: Class): Promise<Assignment[]> {
|
||||
return this.findAll({ where: { within: within }, populate: [ "groups" ] });
|
||||
return this.findAll({ where: { within: within }, populate: [ "groups", "groups.members" ] });
|
||||
}
|
||||
public async deleteByClassAndId(within: Class, id: number): Promise<void> {
|
||||
return this.deleteWhere({ within: within, id: id });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue