diff --git a/Webshop.Api/Program.cs b/Webshop.Api/Program.cs index a219a33..54157bb 100644 --- a/Webshop.Api/Program.cs +++ b/Webshop.Api/Program.cs @@ -38,7 +38,9 @@ var builder = WebApplication.CreateBuilder(options); var allowedOrigins = new string[] { "https://shopsolution-frontend.tzbre.dev", - "http://localhost:4200" + "http://localhost:4200", + "http://localhost:4200/", + "http://localhost:4200/*", }; builder.Services.AddCors(options => diff --git a/Webshop.Domain/Entities/Product.cs b/Webshop.Domain/Entities/Product.cs index 190271f..e6268a0 100644 --- a/Webshop.Domain/Entities/Product.cs +++ b/Webshop.Domain/Entities/Product.cs @@ -83,7 +83,7 @@ namespace Webshop.Domain.Entities { foreach (var catId in categorieIds) { - Productcategories.Add(new Productcategorie { ProductId = this.Id, categorieId = catId }); + Productcategories.Add(new Productcategorie { categorieId = catId }); } } }