fix: werkende aan assignment fix
This commit is contained in:
parent
45ca433e09
commit
69659426de
6 changed files with 44 additions and 21 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 });
|
||||
return this.findOne({ within: within, id: id }, { populate: [ "groups" ]});
|
||||
}
|
||||
public async findAllAssignmentsInClass(within: Class): Promise<Assignment[]> {
|
||||
return this.findAll({ where: { within: within } });
|
||||
return this.findAll({ where: { within: within }, populate: [ "groups" ] });
|
||||
}
|
||||
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