Fix build and implement user/all correctly
This commit is contained in:
parent
a9bd803112
commit
555dacfaf5
17 changed files with 170 additions and 48 deletions
|
|
@ -9,4 +9,17 @@ export class UserRepository extends AbstractRepository<UserEntity> {
|
|||
async findByUserName(userName: string): Promise<UserEntity | null> {
|
||||
return this.repo.findOne({ where: { userName } });
|
||||
}
|
||||
|
||||
/**
|
||||
* Find all users
|
||||
* @returns Array of all UserEntity records
|
||||
*/
|
||||
async findAll(): Promise<UserEntity[]> {
|
||||
return await this.repo.find({
|
||||
order: {
|
||||
lastName: "ASC",
|
||||
firstName: "ASC",
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue