mirror of
https://github.com/immich-app/immich.git
synced 2026-02-06 03:48:38 -05:00
23 lines
539 B
TypeScript
23 lines
539 B
TypeScript
import { Command, CommandRunner } from 'nest-commander';
|
|
import { UserService } from 'src/services/user.service';
|
|
|
|
@Command({
|
|
name: 'list-users',
|
|
description: 'List Immich users',
|
|
})
|
|
export class ListUsersCommand extends CommandRunner {
|
|
constructor(private userService: UserService) {
|
|
super();
|
|
}
|
|
|
|
async run(): Promise<void> {
|
|
try {
|
|
const users = await this.userService.listUsers();
|
|
console.dir(users);
|
|
} catch (error) {
|
|
console.error(error);
|
|
console.error('Unable to load users');
|
|
}
|
|
}
|
|
}
|