Skip to content

Commit

Permalink
Added Carrier color and Carrier type to the bulk lookup API response.
Browse files Browse the repository at this point in the history
  • Loading branch information
uncheckederror committed Sep 2, 2024
1 parent dbe748c commit c0af5b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions NumberSearch.Mvc/Controllers/CartAPIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down Expand Up @@ -62,7 +62,7 @@ await Parallel.ForEachAsync(parsedNumbers, async (number, token) =>
var lookups = new List<BulkLookupResult>();
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);
Expand Down

0 comments on commit c0af5b9

Please sign in to comment.