import { CommandHandler , ICommandHandler } from '@nestjs/cqrs' ; import { GetOrganizationCommand } from '../commands' ; import { OrganizationService } from '../organization.service' ; import { Organization } from '../organization.entity' ; @ CommandHandler ( GetOrganizationCommand ) export class GetOrganizationHandler implements ICommandHandler < GetOrganizationCommand > { constructor ( private readonly organizationService ) { } async execute ( { id } ) { return this . organizationService . findOne ( id ) ; } }