Changed directions in recipedto to a string array instead of an object array Only the dto was changed

This commit is contained in:
Jeas0001 2025-05-13 10:31:37 +02:00
parent 51f6808d8d
commit df7d5f9695
3 changed files with 3 additions and 10 deletions

View File

@ -71,7 +71,7 @@ namespace API.BusinessLogic
foreach (var item in recipe.Directions)
{
Directions directions = new Directions();
directions.Instruktions = item.Instructions;
directions.Instruktions = item;
dish.Directions.Add(directions);
}
@ -112,7 +112,7 @@ namespace API.BusinessLogic
foreach (var item in recipe.Directions)
{
Directions directions = new Directions();
directions.Instruktions = item.Instructions;
directions.Instruktions = item;
dish.Directions.Add(directions);
}

View File

@ -1,7 +0,0 @@
namespace API.Models.RecipeModels
{
public class DirectionsDTO
{
public string Instructions { get; set; }
}
}

View File

@ -6,7 +6,7 @@
public string Description { get; set; }
public List<DirectionsDTO> Directions { get; set; }
public List<string> Directions { get; set; }
public List<IngredientDTO> Ingredients { get; set; }
}