This commit is contained in:
Adam 2024-06-02 11:02:29 +02:00
parent c58f48512c
commit b917b3d09f
1 changed files with 3 additions and 8 deletions

View File

@ -240,18 +240,13 @@ namespace TIAMWebApp.Server.Controllers
[HttpGet]
[Route(APIUrls.GetCarsForUserProductMappingRouteName + "/{userProductMappingId}")]
[SignalR(SignalRTags.GetCarsForUserProductMapping)]
public async Task<Dictionary<Guid, string>> GetCarsForUserProductMapping(string userProductMappingId)
public async Task<List<Car>> GetCarsForUserProductMapping(string userProductMappingId)
{
_logger.Info($@"GetCarsForUserProductMapping called with userProductMappingId: {userProductMappingId}");
var userProductMappingDictionary = new Dictionary<Guid, string>();
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]