mirror of
https://github.com/immich-app/immich.git
synced 2024-12-22 01:47:08 +02:00
parent
96a22ec3c1
commit
2dcce03352
@ -1,6 +1,6 @@
|
||||
import { Command, CommandRunner } from 'nest-commander';
|
||||
import { UserService } from 'src/domain/user/user.service';
|
||||
import { CLI_USER } from 'src/immich-admin/constants';
|
||||
import { UserEntity } from 'src/infra/entities/user.entity';
|
||||
|
||||
@Command({
|
||||
name: 'list-users',
|
||||
@ -13,7 +13,16 @@ export class ListUsersCommand extends CommandRunner {
|
||||
|
||||
async run(): Promise<void> {
|
||||
try {
|
||||
const users = await this.userService.getAll(CLI_USER, true);
|
||||
const users = await this.userService.getAll(
|
||||
{
|
||||
user: {
|
||||
id: 'cli',
|
||||
email: 'cli@immich.app',
|
||||
isAdmin: true,
|
||||
} as UserEntity,
|
||||
},
|
||||
true,
|
||||
);
|
||||
console.dir(users);
|
||||
} catch (error) {
|
||||
console.error(error);
|
@ -1,12 +1,9 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { ListUsersCommand } from 'src/commands/list-users.command';
|
||||
import { DisableOAuthLogin, EnableOAuthLogin } from 'src/commands/oauth-login';
|
||||
import { DisablePasswordLoginCommand, EnablePasswordLoginCommand } from 'src/commands/password-login';
|
||||
import { PromptPasswordQuestions, ResetAdminPasswordCommand } from 'src/commands/reset-admin-password.command';
|
||||
import { DomainModule } from 'src/domain/domain.module';
|
||||
import { ListUsersCommand } from 'src/immich-admin/commands/list-users.command';
|
||||
import { DisableOAuthLogin, EnableOAuthLogin } from 'src/immich-admin/commands/oauth-login';
|
||||
import { DisablePasswordLoginCommand, EnablePasswordLoginCommand } from 'src/immich-admin/commands/password-login';
|
||||
import {
|
||||
PromptPasswordQuestions,
|
||||
ResetAdminPasswordCommand,
|
||||
} from 'src/immich-admin/commands/reset-admin-password.command';
|
||||
import { InfraModule } from 'src/infra/infra.module';
|
||||
|
||||
@Module({
|
||||
|
@ -1,10 +0,0 @@
|
||||
import { AuthDto } from 'src/domain/auth/auth.dto';
|
||||
import { UserEntity } from 'src/infra/entities/user.entity';
|
||||
|
||||
export const CLI_USER: AuthDto = {
|
||||
user: {
|
||||
id: 'cli',
|
||||
email: 'cli@immich.app',
|
||||
isAdmin: true,
|
||||
} as UserEntity,
|
||||
};
|
Loading…
Reference in New Issue
Block a user