feat: teacher get, post en delete route
This commit is contained in:
parent
b8db32161f
commit
6b87722469
6 changed files with 166 additions and 24 deletions
|
@ -5,6 +5,9 @@ export class TeacherRepository extends DwengoEntityRepository<Teacher> {
|
|||
public findByUsername(username: string): Promise<Teacher | null> {
|
||||
return this.findOne({ username: username });
|
||||
}
|
||||
public addTeacher(teacher: Teacher): Promise<void> {
|
||||
return this.save(teacher);
|
||||
}
|
||||
public deleteByUsername(username: string): Promise<void> {
|
||||
return this.deleteWhere({ username: username });
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue