Skip to content

Commit

Permalink
feat: Detailed license information
Browse files Browse the repository at this point in the history
  • Loading branch information
dogukanoksuz committed Aug 1, 2024
1 parent f84749d commit 5d5db99
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/Http/Controllers/API/Settings/ExtensionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ public function index()
{
$extensions = Extension::orderBy('updated_at', 'DESC')->get()->map(function ($item) {
$item->updated = Carbon::parse($item->getRawOriginal('updated_at'))->getPreciseTimestamp(3);
$item->licensed = $item->license()->count() > 0;
if ($item->license_type) {
$item->licensed = $item->license()->count() > 0 ? "licensed" : "not_licensed";
} else {
$item->licensed = "non_commercial";
}

return $item;
});
Expand Down

0 comments on commit 5d5db99

Please sign in to comment.