diff --git a/server/src/immich-admin/commands/list-users.command.ts b/server/src/commands/list-users.command.ts similarity index 62% rename from server/src/immich-admin/commands/list-users.command.ts rename to server/src/commands/list-users.command.ts index 8ab882396e..eeda72d1c2 100644 --- a/server/src/immich-admin/commands/list-users.command.ts +++ b/server/src/commands/list-users.command.ts @@ -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 { 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); diff --git a/server/src/immich-admin/commands/oauth-login.ts b/server/src/commands/oauth-login.ts similarity index 100% rename from server/src/immich-admin/commands/oauth-login.ts rename to server/src/commands/oauth-login.ts diff --git a/server/src/immich-admin/commands/password-login.ts b/server/src/commands/password-login.ts similarity index 100% rename from server/src/immich-admin/commands/password-login.ts rename to server/src/commands/password-login.ts diff --git a/server/src/immich-admin/commands/reset-admin-password.command.ts b/server/src/commands/reset-admin-password.command.ts similarity index 100% rename from server/src/immich-admin/commands/reset-admin-password.command.ts rename to server/src/commands/reset-admin-password.command.ts diff --git a/server/src/immich-admin/app.module.ts b/server/src/immich-admin/app.module.ts index 277b39a902..b491fbb556 100644 --- a/server/src/immich-admin/app.module.ts +++ b/server/src/immich-admin/app.module.ts @@ -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({ diff --git a/server/src/immich-admin/constants.ts b/server/src/immich-admin/constants.ts deleted file mode 100644 index 237f66e637..0000000000 --- a/server/src/immich-admin/constants.ts +++ /dev/null @@ -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, -};