fix: gefaalde testen voor class controller gefixt
This commit is contained in:
parent
7a443c0686
commit
943dd04e97
4 changed files with 33 additions and 29 deletions
|
@ -1,3 +1,4 @@
|
|||
import { Class } from '../../entities/classes/class.entity.js';
|
||||
import { Student } from '../../entities/users/student.entity.js';
|
||||
import { User } from '../../entities/users/user.entity.js';
|
||||
import { DwengoEntityRepository } from '../dwengo-entity-repository.js';
|
||||
|
@ -9,6 +10,9 @@ export class StudentRepository extends DwengoEntityRepository<Student> {
|
|||
public findByUsername(username: string): Promise<Student | null> {
|
||||
return this.findOne({ username: username });
|
||||
}
|
||||
public findByClass(cls: Class): Promise<Student[]> {
|
||||
return this.find({ classes: cls });
|
||||
}
|
||||
public deleteByUsername(username: string): Promise<void> {
|
||||
return this.deleteWhere({ username: username });
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue