Skip to content

Commit

Permalink
Fixed array error in CheckOnlineControler
Browse files Browse the repository at this point in the history
  • Loading branch information
blt950 committed Jan 15, 2023
1 parent 5b7d6d8 commit fefbcf3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/Console/Commands/CheckOnlineControllers.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use App\Notifications\InactiveOnlineStaffNotification;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Http;
use Carbon\Carbon;
use anlutro\LaravelSettings\Facade as Setting;

Expand Down Expand Up @@ -59,8 +60,8 @@ public function handle()
$this->info("Collecting online controllers...");

// Fetch the latest URI to data feed
$dataUri = json_decode(file_get_contents('https://status.vatsim.net/status.json'))->data->v3[0];
$vatsimData = json_decode(file_get_contents($dataUri))->controllers;
$dataUri = Http::get('https://status.vatsim.net/status.json')['data']['v3'][0];
$vatsimData = Http::get($dataUri)['controllers'];

foreach($vatsimData as $d){
if(preg_match($areasRegex, $d->callsign)){
Expand Down

0 comments on commit fefbcf3

Please sign in to comment.