Fix build and implement user/all correctly

This commit is contained in:
araemer 2025-11-18 20:26:28 +01:00
parent a9bd803112
commit 555dacfaf5
17 changed files with 170 additions and 48 deletions

View file

@ -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",
},
});
}
}