refactor: Update PrivateKey model to use ownedByCurrentTeam() scope for cleanupUnusedKeys()

This commit is contained in:
Andras Bacsai
2024-09-20 13:05:51 +02:00
parent f9238ce263
commit 760cf8aeb5

View File

@@ -229,7 +229,7 @@ class PrivateKey extends BaseModel
public static function cleanupUnusedKeys()
{
self::all()->each(function ($privateKey) {
self::ownedByCurrentTeam()->each(function ($privateKey) {
$privateKey->safeDelete();
});
}