From 4b1e02d2bbfe5ea5cc248e575d6fb63b747b2016 Mon Sep 17 00:00:00 2001 From: A-Guldborg Date: Thu, 30 Nov 2023 18:50:51 +0100 Subject: [PATCH] Add productusergroups to get products --- .../CoffeeCard.WebApi/Controllers/v2/ProductsController.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coffeecard/CoffeeCard.WebApi/Controllers/v2/ProductsController.cs b/coffeecard/CoffeeCard.WebApi/Controllers/v2/ProductsController.cs index 36bed38f..1e1fbe7e 100644 --- a/coffeecard/CoffeeCard.WebApi/Controllers/v2/ProductsController.cs +++ b/coffeecard/CoffeeCard.WebApi/Controllers/v2/ProductsController.cs @@ -101,7 +101,8 @@ private static ProductResponse MapProductToDto(Product product) Description = product.Description, NumberOfTickets = product.NumberOfTickets, Price = product.Price, - IsPerk = product.IsPerk() + IsPerk = product.IsPerk(), + AllowedUserGroups = product.ProductUserGroup.Select(e => e.UserGroup) }; } }