mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 17:28:55 +00:00
Make API responses uniform
This commit is contained in:
@@ -17,7 +17,7 @@ use Illuminate\View\View;
|
||||
class BasePageController extends Controller
|
||||
{
|
||||
/**
|
||||
* @var Collection<int, mixed>
|
||||
* @var \Illuminate\Support\Collection<int, mixed>
|
||||
*/
|
||||
public \Illuminate\Support\Collection $settings; // @phpstan-ignore property.phpDocType, class.notFound, missingType.generics
|
||||
|
||||
@@ -81,6 +81,10 @@ class BasePageController extends Controller
|
||||
if (Auth::check()) {
|
||||
$userId = Auth::id();
|
||||
$this->userdata = User::find($userId);
|
||||
if (! $this->userdata?->hasVerifiedEmail()) {
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
// Cache category exclusions per user (5 minutes)
|
||||
$this->userdata->categoryexclusions = $this->rememberWithCacheFallback(
|
||||
'user_category_exclusions_'.$userId,
|
||||
|
||||
Reference in New Issue
Block a user