Session api token validation

This commit is contained in:
2026-06-23 11:20:01 +10:00
parent cd1538ba12
commit fcba639bae
25 changed files with 491 additions and 235 deletions
+3 -2
View File
@@ -5,6 +5,7 @@ namespace App\Http\Controllers;
use App\Models\UserFlight;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\DB;
use Inertia\Inertia;
use Inertia\Response;
@@ -14,9 +15,9 @@ class HomePageController extends Controller
{
return Cache::remember('splash_flights', now()->addHours(12), function () {
return UserFlight::query()
->with(['departureAirport', 'arrivalAirport'])
->with(['departureAirport', 'arrivalAirport', 'user'])
->whereHas('user', function ($query) {
$query->whereRaw("settings->>'profile_privacy' is distinct from 'private'");
$query->whereRaw(DB::raw("settings->>'profile_privacy' is distinct from 'private'"));
})
->orderByDesc('departure_date')
->limit(50)