refactor(backend): Functions
This commit is contained in:
parent
5ec62554e3
commit
65c1a5e6b6
57 changed files with 172 additions and 117 deletions
|
@ -2,10 +2,10 @@ import { Student } from '../../entities/users/student.entity.js';
|
|||
import { DwengoEntityRepository } from '../dwengo-entity-repository.js';
|
||||
|
||||
export class StudentRepository extends DwengoEntityRepository<Student> {
|
||||
public findByUsername(username: string): Promise<Student | null> {
|
||||
public async findByUsername(username: string): Promise<Student | null> {
|
||||
return this.findOne({ username: username });
|
||||
}
|
||||
public deleteByUsername(username: string): Promise<void> {
|
||||
public async deleteByUsername(username: string): Promise<void> {
|
||||
return this.deleteWhere({ username: username });
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue