Feat: Delete unused private keys button
This commit is contained in:
24
app/Livewire/Security/PrivateKey/Index.php
Normal file
24
app/Livewire/Security/PrivateKey/Index.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire\Security\PrivateKey;
|
||||
|
||||
use Livewire\Component;
|
||||
use App\Models\PrivateKey;
|
||||
|
||||
class Index extends Component
|
||||
{
|
||||
public function render()
|
||||
{
|
||||
$privateKeys = PrivateKey::ownedByCurrentTeam(['name', 'uuid', 'is_git_related', 'description'])->get();
|
||||
|
||||
return view('livewire.security.private-key.index', [
|
||||
'privateKeys' => $privateKeys,
|
||||
])->layout('components.layout');
|
||||
}
|
||||
|
||||
public function cleanupUnusedKeys()
|
||||
{
|
||||
PrivateKey::cleanupUnusedKeys();
|
||||
$this->dispatch('success', 'Unused keys have been cleaned up.');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user