import { inject } from "@codemation/core"; import type { UserAccountDto } from "../contracts/userDirectoryContracts.types"; import { QueryHandler } from "../bus/QueryHandler"; import { HandlesQuery } from "../../infrastructure/di/HandlesQueryRegistry"; import { UserAccountService } from "../../domain/users/UserAccountServiceRegistry"; import { ListUserAccountsQuery } from "./ListUserAccountsQuery"; @HandlesQuery.for(ListUserAccountsQuery) export class ListUserAccountsQueryHandler extends QueryHandler> { constructor(@inject(UserAccountService) private readonly userAccounts: UserAccountService) { super(); } async execute(_query: ListUserAccountsQuery): Promise> { return await this.userAccounts.listUsers(); } }