finish acceptance tests and refactor IotaCodesClient to service container

This commit is contained in:
Richard Morgan
2017-05-15 22:14:14 -04:00
parent 2c8c692890
commit e4e17dedc5
13 changed files with 338 additions and 24 deletions

View File

@@ -115,7 +115,7 @@ class TripController extends Controller
return $this->returnErrorMessage('destination not set', 400);
}
$client = IotaClient::create();
$client = app('IotaCodesClient');
$airport = $client->getAirport($destination);
if (is_null($airport)) {
return $this->returnErrorMessage('destination not a valid airport code', 400);