Session api token validation
This commit is contained in:
@@ -15,16 +15,27 @@ class UpdateAlliances extends Command
|
||||
{
|
||||
public function handle()
|
||||
{
|
||||
$time = now('UTC')->startOfMinute();
|
||||
$day = Date('Y-m-d', $time);
|
||||
$day = now('UTC')->startOfMinute()->toDateString();
|
||||
|
||||
if($day == '2026-12-17'){
|
||||
Airline::whereInternalName('asiana')->update(['alliance' => null]);
|
||||
$schedules = [
|
||||
'2026-12-17' => [
|
||||
['airline' => 'asiana', 'alliance' => null],
|
||||
],
|
||||
'2027-12-12' => [
|
||||
['airline' => 'philippine-airlines', 'alliance' => 'oneworld'],
|
||||
],
|
||||
];
|
||||
|
||||
if (!isset($schedules[$day])) {
|
||||
return;
|
||||
}
|
||||
|
||||
if($day == '2027-12-12'){
|
||||
$oneworld = Alliance::whereInternalName('oneworld')->first();
|
||||
Airline::whereInternalName('philippine-airlines')->update(['alliance' => $oneworld->id]);
|
||||
foreach ($schedules[$day] as $change) {
|
||||
$allianceId = $change['alliance']
|
||||
? Alliance::whereInternalName($change['alliance'])->value('id')
|
||||
: null;
|
||||
|
||||
Airline::whereInternalName($change['airline'])->update(['alliance' => $allianceId]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class FeedController extends Controller
|
||||
->pluck('id');
|
||||
|
||||
return UserFlight::query()
|
||||
->with(['departureAirport', 'arrivalAirport', 'user'])
|
||||
->with(['departureAirport', 'departureAirport.region.country', 'arrivalAirport', 'arrivalAirport.region.country', 'user', 'airline'])
|
||||
->whereIn('user_id', $followingIds)
|
||||
->orderByDesc('departure_date')
|
||||
->limit(100)
|
||||
|
||||
@@ -15,7 +15,7 @@ class HomePageController extends Controller
|
||||
{
|
||||
return Cache::remember('splash_flights', now()->addHours(12), function () {
|
||||
return UserFlight::query()
|
||||
->with(['departureAirport', 'arrivalAirport', 'user'])
|
||||
->with(['departureAirport', 'departureAirport.region.country', 'arrivalAirport', 'arrivalAirport.region.country' ,'user', 'airline'])
|
||||
->whereHas('user', function ($query) {
|
||||
$query->whereRaw(DB::raw("settings->>'profile_privacy' is distinct from 'private'"));
|
||||
})
|
||||
|
||||
@@ -74,6 +74,13 @@ class SettingsRegistry
|
||||
'category' => 'FlightsGoneBy Settings',
|
||||
'default' => true,
|
||||
],
|
||||
[
|
||||
'key' => 'hide_map_filters',
|
||||
'type' => 'checkbox',
|
||||
'label' => 'Hide Map Filters By Default',
|
||||
'category' => 'FlightsGoneBy Settings',
|
||||
'default' => false,
|
||||
],
|
||||
[
|
||||
'key' => 'hide_impossible_achievements',
|
||||
'type' => 'checkbox',
|
||||
|
||||
Reference in New Issue
Block a user