Skip to content

Commit

Permalink
Minor fixes for trial starts
Browse files Browse the repository at this point in the history
  • Loading branch information
turbo124 committed Jan 21, 2025
1 parent 736c694 commit 0283fe9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/Http/Controllers/ClientPortal/NinjaPlanController.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public function index(string $contact_key, string $account_or_company_key)
nlog('Ninja Plan Controller - Found and set Client Contact');

request()->session()->invalidate();
request()->session()->regenerateToken();
Auth::guard('contact')->loginUsingId($client_contact->id, true);

return $this->plan();
Expand Down
4 changes: 3 additions & 1 deletion routes/client.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@
Route::get('error', [App\Http\Controllers\ClientPortal\ContactHashLoginController::class, 'errorPage'])->name('client.error');
Route::get('client/payment/{contact_key}/{payment_id}', [App\Http\Controllers\ClientPortal\InvitationController::class, 'paymentRouter'])->middleware(['domain_db','contact_key_login']);
Route::get('client/ninja/{contact_key}/{company_key}', [App\Http\Controllers\ClientPortal\NinjaPlanController::class, 'index'])->name('client.ninja_contact_login')->middleware(['domain_db']);
Route::post('client/ninja/trial_confirmation', [App\Http\Controllers\ClientPortal\NinjaPlanController::class, 'trial_confirmation'])->name('client.trial.response')->middleware(['domain_db']);
//Route::post('client/ninja/trial_confirmation', [App\Http\Controllers\ClientPortal\NinjaPlanController::class, 'trial_confirmation'])->name('client.trial.response')->middleware(['domain_db']);

Route::group(['middleware' => ['auth:contact', 'locale', 'domain_db','check_client_existence'], 'prefix' => 'client', 'as' => 'client.'], function () {
Route::get('dashboard', [App\Http\Controllers\ClientPortal\DashboardController::class, 'index'])->name('dashboard'); // name = (dashboard. index / create / show / update / destroy / edit

Route::post('client/ninja/trial_confirmation', [App\Http\Controllers\ClientPortal\NinjaPlanController::class, 'trial_confirmation'])->name('client.trial.response')->middleware(['domain_db']);

Route::get('plan', [App\Http\Controllers\ClientPortal\NinjaPlanController::class, 'plan'])->name('plan'); // name = (dashboard. index / create / show / update / destroy / edit

Route::get('showBlob/{hash}', [App\Http\Controllers\ClientPortal\InvoiceController::class, 'showBlob'])->name('invoices.showBlob');
Expand Down

0 comments on commit 0283fe9

Please sign in to comment.