Refactor steps controller (#3627)

This commit is contained in:
Benjamin Beganović 2020-04-14 00:20:38 +02:00 committed by GitHub
parent eea9015cd3
commit d36cb2fafa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -160,7 +160,7 @@ class StepsController extends BaseController
->force(array_key_exists('force', $company))
->company($company['id'])
->endpoint(session('MIGRATION_ENDPOINT'))
->companyKey($company['key'])
->companyKey($request->account_key)
->start();
}

View File

@ -14,6 +14,7 @@
<h4>Awesome! Please select the company you would like to apply migration.</h4>
<form action="/migration/companies" method="post" id="auth-form">
{{ csrf_field() }}
<input type="hidden" name="account_key" value="{{ auth()->user()->account->account_key }}">
@foreach($companies as $company)
<div class="form-check">
@ -24,7 +25,6 @@
</div>
<div class="form-group">
<input type="checkbox" name="companies[{{ $company->id }}][force]">
<input type="hidden" name="companies[{{ $company->id }}][key]" value="{{ $company->company_key }}">
<label for="force">Force migration</label>
<small>* All current company data will be wiped.</small>
</div>