refactor(server): immich-admin list-users (#8862)

This commit is contained in:
Jason Rasmussen 2024-04-17 08:27:04 -04:00 committed by GitHub
parent c227f9893e
commit 3a9df6dae8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 36 additions and 20 deletions

View file

@ -37,6 +37,11 @@ export class UserService {
this.configCore = SystemConfigCore.create(configRepository, this.logger);
}
async listUsers(): Promise<UserResponseDto[]> {
const users = await this.userRepository.getList({ withDeleted: true });
return users.map((user) => mapUser(user));
}
async getAll(auth: AuthDto, isAll: boolean): Promise<UserResponseDto[]> {
const users = await this.userRepository.getList({ withDeleted: !isAll });
return users.map((user) => mapUser(user));