public IActionResult GetRecipeSteps(int recipeId, bool includeIngredients = false) { if (!_homeBrewRepository.RecipeExists(recipeId)) { return(NotFound()); } var stepsForRecipe = _homeBrewRepository.GetStepsForRecipe(recipeId, includeIngredients); if (includeIngredients) { return(Ok(_mapper.Map <IEnumerable <RecipeStepDto> >(stepsForRecipe))); } return(Ok(_mapper.Map <IEnumerable <RecipeStepWithoutIngredientsDto> >(stepsForRecipe))); }