|
@@ -19,10 +19,10 @@ public class Recipe {
|
|
|
Object nutrition;
|
|
Object nutrition;
|
|
|
int servings;
|
|
int servings;
|
|
|
Optional<ImageIcon> photo; // TODO JSONIZATION
|
|
Optional<ImageIcon> photo; // TODO JSONIZATION
|
|
|
- List<Card> cards = new ArrayList<>();
|
|
|
|
|
|
|
+ List<Product> products = new ArrayList<>();
|
|
|
|
|
|
|
|
@JsonIgnore
|
|
@JsonIgnore
|
|
|
Collection<Ingredient> getIngredients() {
|
|
Collection<Ingredient> getIngredients() {
|
|
|
- return cards.stream().flatMap(Card::getIngredientsAsStream).collect(Collectors.toList());
|
|
|
|
|
|
|
+ return products.stream().flatMap(Product::getIngredientsAsStream).collect(Collectors.toList());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|