diff --git a/TIAMWebApp/Server/Controllers/ServiceProviderAPIController.cs b/TIAMWebApp/Server/Controllers/ServiceProviderAPIController.cs index 1c6707e6..edc5a013 100644 --- a/TIAMWebApp/Server/Controllers/ServiceProviderAPIController.cs +++ b/TIAMWebApp/Server/Controllers/ServiceProviderAPIController.cs @@ -240,18 +240,13 @@ namespace TIAMWebApp.Server.Controllers [HttpGet] [Route(APIUrls.GetCarsForUserProductMappingRouteName + "/{userProductMappingId}")] [SignalR(SignalRTags.GetCarsForUserProductMapping)] - public async Task> GetCarsForUserProductMapping(string userProductMappingId) + public async Task> GetCarsForUserProductMapping(string userProductMappingId) { _logger.Info($@"GetCarsForUserProductMapping called with userProductMappingId: {userProductMappingId}"); - var userProductMappingDictionary = new Dictionary(); + var cars = adminDal.GetCarByUserProductMappingId(Guid.Parse(userProductMappingId)); - var serviceProviders = adminDal.GetCarByUserProductMappingId(Guid.Parse(userProductMappingId)); - - var myServiceproviders = serviceProviders.Where(x => x.Id == Guid.Parse(userProductMappingId)).ToDictionary(x => x.Id, x => x.Name); - //put serviceprovider id and name into a dictionary - - return myServiceproviders; + return cars; } [AllowAnonymous]