mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 20:52:56 +01:00
Refactor for hosted migration
This commit is contained in:
parent
1da5352bed
commit
05b12a6bb9
@ -72,10 +72,17 @@ class StepsController extends BaseController
|
||||
|
||||
session()->put('MIGRATION_ENDPOINT', 'https://v5-app1.invoicing.co');
|
||||
|
||||
|
||||
//refactor here to make this a little more magical
|
||||
//
|
||||
return redirect(
|
||||
url('/migration/auth')
|
||||
url('/migration/companies')
|
||||
);
|
||||
|
||||
// return redirect(
|
||||
// url('/migration/auth')
|
||||
// );
|
||||
|
||||
// return redirect(
|
||||
// url('/migration/endpoint')
|
||||
// );
|
||||
@ -209,6 +216,28 @@ class StepsController extends BaseController
|
||||
);
|
||||
}
|
||||
|
||||
if(Utils::isNinja())
|
||||
{
|
||||
|
||||
//push a job with $request->all() and the auth()->user() reference;
|
||||
//
|
||||
//In that job we will
|
||||
//
|
||||
//Create data file
|
||||
//
|
||||
//Send along a custom protected route
|
||||
//
|
||||
//auth as the end user
|
||||
//and process as per normal.
|
||||
//
|
||||
//we should include a success failure email to contact@ so we can follow up.
|
||||
|
||||
if ($completeService->isSuccessful()) {
|
||||
return view('migration.completed');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$completeService = (new CompleteService(session('MIGRATION_ACCOUNT_TOKEN')));
|
||||
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user