mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor(server): immich-admin list-users (#8862)
This commit is contained in:
parent
c227f9893e
commit
3a9df6dae8
5 changed files with 36 additions and 20 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue