Skip to content

Commit

Permalink
Pull missing apps on update apps list
Browse files Browse the repository at this point in the history
  • Loading branch information
KodeStar committed Mar 17, 2022
1 parent 18001fb commit 8cc6a9c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/Jobs/ProcessApps.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Illuminate\Support\Facades\Storage;
use App\Application;
use App\SupportedApps;
use App\Item;

class ProcessApps implements ShouldQueue
{
Expand Down Expand Up @@ -42,5 +43,13 @@ public function handle()
$app->save();
}

$items = Item::whereNotNull('class')->get();
foreach($items as $item) {
if(!file_exists(app_path('SupportedApps/'.Item::nameFromClass($item->class)))) {
$app = Application::where('class', $item->class)->first();
Application::getApp($app->appid);
}
}

}
}

0 comments on commit 8cc6a9c

Please sign in to comment.