mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Working on improving hosted migration experience
This commit is contained in:
parent
a38dcbdd87
commit
8554c6cceb
@ -21,6 +21,7 @@ class HostedMigrationController extends Controller
|
||||
|
||||
public function getAccount(Request $request)
|
||||
{
|
||||
|
||||
if($request->header('X-API-HOSTED-SECRET') != config('ninja.ninja_hosted_secret'))
|
||||
return;
|
||||
|
||||
@ -32,8 +33,7 @@ class HostedMigrationController extends Controller
|
||||
return response()->json(['token' => $user->account->companies->first()->tokens->first()->token] ,200);
|
||||
}
|
||||
|
||||
|
||||
return response()->json(['error' => 'This user is not able to perform a migration. Please contact us at contact@invoiceninja.com to discuss.'], 401)
|
||||
return response()->json(['error' => 'This user is not able to perform a migration. Please contact us at contact@invoiceninja.com to discuss.'], 401);
|
||||
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ class CreateUser
|
||||
{
|
||||
$user = new User();
|
||||
$user->account_id = $this->account->id;
|
||||
$user->password = bcrypt($this->request['password']);
|
||||
$user->password = $this->request['password'] ? bcrypt($this->request['password']) : '';
|
||||
$user->accepted_terms_version = config('ninja.terms_version');
|
||||
$user->confirmation_code = $this->createDbHash(config('database.default'));
|
||||
$user->fill($this->request);
|
||||
|
@ -205,7 +205,6 @@ Route::match(['get', 'post'], 'payment_notification_webhook/{company_key}/{compa
|
||||
Route::post('api/v1/postmark_webhook', 'PostMarkController@webhook');
|
||||
Route::get('token_hash_router', 'OneTimeTokenController@router');
|
||||
Route::get('webcron', 'WebCronController@index');
|
||||
|
||||
Route::post('api/v1/get_migration_account', 'HostedMigration@getAccount');
|
||||
Route::post('api/v1/get_migration_account', 'HostedMigrationController@getAccount')->middleware('guest');
|
||||
|
||||
Route::fallback('BaseController@notFound');
|
||||
|
Loading…
x
Reference in New Issue
Block a user