Skip to content

Commit

Permalink
Added carrier info to the new API endpoint.
Browse files Browse the repository at this point in the history
  • Loading branch information
uncheckederror committed Aug 14, 2024
1 parent c6425fd commit e1ae7ca
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 @@ -34,7 +34,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);
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);

[HttpGet("Number/Search/Bulk")]
public async Task<IActionResult> NumberSearchBulkAsync(string token, string dialedNumber)
Expand Down Expand Up @@ -63,7 +63,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));
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));
}

return Ok(lookups);
Expand Down

0 comments on commit e1ae7ca

Please sign in to comment.