Fix airline creation logic in installer #677 (#678)

This commit is contained in:
Nabeel S 2020-05-02 15:09:27 -04:00 committed by GitHub
parent 99f4f3b3d8
commit 2ea18ae1c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 193 additions and 189 deletions

374
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -45,7 +45,7 @@ class InstallerController extends Controller
* @param UserService $userService * @param UserService $userService
*/ */
public function __construct( public function __construct(
AirlineService $airlineRepo, AirlineService $airlineSvc,
AnalyticsService $analyticsSvc, AnalyticsService $analyticsSvc,
DatabaseService $dbService, DatabaseService $dbService,
ConfigService $envService, ConfigService $envService,
@ -54,7 +54,7 @@ class InstallerController extends Controller
SeederService $seederSvc, SeederService $seederSvc,
UserService $userService UserService $userService
) { ) {
$this->airlineRepo = $airlineRepo; $this->airlineSvc = $airlineSvc;
$this->analyticsSvc = $analyticsSvc; $this->analyticsSvc = $analyticsSvc;
$this->dbSvc = $dbService; $this->dbSvc = $dbService;
$this->envSvc = $envService; $this->envSvc = $envService;
@ -310,7 +310,7 @@ class InstallerController extends Controller
'country' => $request->get('airline_country'), 'country' => $request->get('airline_country'),
]; ];
$airline = $this->airlineSvc->create($attrs); $airline = $this->airlineSvc->createAirline($attrs);
/** /**
* Create the user, and associate to the airline * Create the user, and associate to the airline

View File

@ -140,7 +140,7 @@
e.preventDefault(); e.preventDefault();
const opts = { const opts = {
method: 'POST', method: 'POST',
url: '/importer/dbtest', url: '/install/dbtest',
data: { data: {
_token: "{{ csrf_token() }}", _token: "{{ csrf_token() }}",
db_conn: 'mysql', db_conn: 'mysql',