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

@ -1,5 +1,4 @@
import { Command, CommandRunner } from 'nest-commander';
import { UserEntity } from 'src/entities/user.entity';
import { UserService } from 'src/services/user.service';
@Command({
@ -13,16 +12,7 @@ export class ListUsersCommand extends CommandRunner {
async run(): Promise<void> {
try {
const users = await this.userService.getAll(
{
user: {
id: 'cli',
email: 'cli@immich.app',
isAdmin: true,
} as UserEntity,
},
true,
);
const users = await this.userService.listUsers();
console.dir(users);
} catch (error) {
console.error(error);