diff --git a/content/recipes/cqrs.md b/content/recipes/cqrs.md index d67e5c445f..35460161fc 100644 --- a/content/recipes/cqrs.md +++ b/content/recipes/cqrs.md @@ -185,7 +185,7 @@ export class GetHeroHandler implements IQueryHandler { constructor(private repository: HeroesRepository) {} async execute(query: GetHeroQuery) { - return this.repository.findOneById(query.hero); + return this.repository.findOneById(query.heroId); } } @@switch