From c0af5b9e57f3a1532e79c42291a47420965e4bef Mon Sep 17 00:00:00 2001 From: Thomas Ryan Date: Mon, 2 Sep 2024 16:45:53 -0700 Subject: [PATCH] Added Carrier color and Carrier type to the bulk lookup API response. --- NumberSearch.Mvc/Controllers/CartAPIController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NumberSearch.Mvc/Controllers/CartAPIController.cs b/NumberSearch.Mvc/Controllers/CartAPIController.cs index f855af31..36d46a4a 100644 --- a/NumberSearch.Mvc/Controllers/CartAPIController.cs +++ b/NumberSearch.Mvc/Controllers/CartAPIController.cs @@ -32,7 +32,7 @@ public CartAPIController(MvcConfiguration mvcConfiguration) _configuration = mvcConfiguration; } - public record BulkLookupResult(string DialedNumber, string City, string State, DateTime DateIngested, bool Wireless, bool Portable, DateTime LastPorted, string SPID, string LATA, string LEC, string LECType, string LIDBName, string LRN, string OCN, string CarrierName, string CarrierLogoLink); + public record BulkLookupResult(string DialedNumber, string City, string State, DateTime DateIngested, bool Wireless, bool Portable, DateTime LastPorted, string SPID, string LATA, string LEC, string LECType, string LIDBName, string LRN, string OCN, string CarrierName, string CarrierLogoLink, string CarrierColor, string CarrierType); [HttpGet("Number/Search/Bulk")] [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] @@ -62,7 +62,7 @@ await Parallel.ForEachAsync(parsedNumbers, async (number, token) => var lookups = new List(); foreach (var number in results) { - lookups.Add(new BulkLookupResult(number.PortedDialedNumber, number.City,number.State, number.DateIngested, number.Wireless, number.Portable,number.LrnLookup.LastPorted,number.LrnLookup.SPID,number.LrnLookup.LATA,number.LrnLookup.LEC,number.LrnLookup.LECType,number.LrnLookup.LIDBName,number.LrnLookup.LRN,number.LrnLookup.OCN, number.Carrier.Name, number.Carrier.LogoLink)); + lookups.Add(new BulkLookupResult(number.PortedDialedNumber, number.City,number.State, number.DateIngested, number.Wireless, number.Portable,number.LrnLookup.LastPorted,number.LrnLookup.SPID,number.LrnLookup.LATA,number.LrnLookup.LEC,number.LrnLookup.LECType,number.LrnLookup.LIDBName,number.LrnLookup.LRN,number.LrnLookup.OCN, number.Carrier.Name, number.Carrier.LogoLink, number.Carrier.Color, number.Carrier.Type)); } return Ok(lookups);