From e66522308e3df01a4f3d011d71cd21ecc118ee01 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 25 Oct 2024 08:39:58 +0200 Subject: [PATCH] Refactor function and configuration names for experimental features --- app/Livewire/Admin/Index.php | 23 ++++++++++++----------- routes/web.php | 4 ++-- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/app/Livewire/Admin/Index.php b/app/Livewire/Admin/Index.php index 26b31e515..16cd9152e 100644 --- a/app/Livewire/Admin/Index.php +++ b/app/Livewire/Admin/Index.php @@ -14,6 +14,18 @@ class Index extends Component public $search = ''; + public function mount() + { + if (! isCloud()) { + return redirect()->route('dashboard'); + } + + if (auth()->user()->id !== 0) { + return redirect()->route('dashboard'); + } + $this->getSubscribers(); + } + public function submitSearch() { if ($this->search !== '') { @@ -38,17 +50,6 @@ class Index extends Component } } - public function mount() - { - if (! isCloud()) { - return redirect()->route('dashboard'); - } - if (auth()->user()->id !== 0) { - return redirect()->route('dashboard'); - } - $this->getSubscribers(); - } - public function getSubscribers() { $this->inactive_subscribers = User::whereDoesntHave('teams', function ($query) { diff --git a/routes/web.php b/routes/web.php index eb1480b9f..d4cdff7e5 100644 --- a/routes/web.php +++ b/routes/web.php @@ -83,9 +83,9 @@ if (isDev()) { Route::get('/admin', AdminIndex::class)->name('admin.index'); -Route::post('/forgot-password', [Controller::class, 'forgot_password'])->name('password.forgot'); +Route::post('/forgot-password', [Controller::class, 'forgot_password'])->name('password.forgot')->middleware('throttle:forgot-password'); Route::get('/realtime', [Controller::class, 'realtime_test'])->middleware('auth'); -Route::get('/waitlist', WaitlistIndex::class)->name('waitlist.index'); +// Route::get('/waitlist', WaitlistIndex::class)->name('waitlist.index'); Route::get('/verify', [Controller::class, 'verify'])->middleware('auth')->name('verify.email'); Route::get('/email/verify/{id}/{hash}', [Controller::class, 'email_verify'])->middleware(['auth'])->name('verify.verify'); Route::middleware(['throttle:login'])->group(function () {