Skip to content

Commit

Permalink
#42: update the orders.creator
Browse files Browse the repository at this point in the history
  • Loading branch information
SaintAngeLs committed Dec 4, 2023
1 parent da93fa6 commit 75233c9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ public async Task<CourierDto> GetBestAsync()
{
// the most potential resource of the issues to resolve in the api connection
var couriers = await _httpClient.GetAsync<PagedResult<CourierDto>>($"{_url}/courier");
var bestCourier = vehicles?.Items?.FirstOrDefault();
var bestCourier = couriers?.Items?.FirstOrDefault();
if (bestCourier is null)
{
throw new InvalidOperationException("The best vehicle was not found.");
throw new InvalidOperationException("The best courier was not found.");
}

return bestCourier;
Expand Down

0 comments on commit 75233c9

Please sign in to comment.