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 @@ private static function fingerprintExists($fingerprint, $excludeId = null)
public static function cleanupUnusedKeys()
{
self::all()->each(function ($privateKey) {
self::ownedByCurrentTeam()->each(function ($privateKey) {
$privateKey->safeDelete();
});
}