Skip to content

Commit

Permalink
chore(server): move commands (#8121)
Browse files Browse the repository at this point in the history
move commands
  • Loading branch information
danieldietzler committed Mar 20, 2024
1 parent 96a22ec commit 2dcce03
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -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',
Expand All @@ -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);
Expand Down
File renamed without changes.
File renamed without changes.
11 changes: 4 additions & 7 deletions server/src/immich-admin/app.module.ts
Original file line number Diff line number Diff line change
@@ -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({
Expand Down
10 changes: 0 additions & 10 deletions server/src/immich-admin/constants.ts

This file was deleted.

0 comments on commit 2dcce03

Please sign in to comment.