Skip to content

Commit

Permalink
Pint, cheers 🍻
Browse files Browse the repository at this point in the history
  • Loading branch information
blt950 committed Oct 4, 2023
1 parent c9dace3 commit d00f3e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/Console/Commands/CheckUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ public function handle()
$currentVersion = 'v' . config('app.version');
$releasedData = Http::get('https://api.github.com/repos/Vatsim-Scandinavia/controlcenter/releases')->json();

if(isset($releasedData) && isset($releasedData[0]) && isset($releasedData[0]['name'])){
if (isset($releasedData) && isset($releasedData[0]) && isset($releasedData[0]['name'])) {
$releasedVersion = $releasedData[0]['name'];

if ($currentVersion != $releasedVersion) {
$this->info("There's a new version of Control Center available! Please update to $releasedVersion.");
Setting::set('_updateAvailable', $releasedVersion);
} else {
$this->info("Control Center is up to date.");
$this->info('Control Center is up to date.');
Setting::forget('_updateAvailable');
}

Setting::save();

}
Expand Down

0 comments on commit d00f3e8

Please sign in to comment.