From 43895419ffbf67a70d048f56616fd0c7b7a8698a Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Tue, 17 Sep 2024 13:45:05 +0200 Subject: [PATCH] Remove unused code --- app/Models/PrivateKey.php | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/app/Models/PrivateKey.php b/app/Models/PrivateKey.php index 79f36ccf8..f2fa9c9cf 100644 --- a/app/Models/PrivateKey.php +++ b/app/Models/PrivateKey.php @@ -7,7 +7,6 @@ use Illuminate\Support\Facades\Storage; use Illuminate\Validation\ValidationException; use phpseclib3\Crypt\PublicKeyLoader; use DanHarrin\LivewireRateLimiting\WithRateLimiting; -use Illuminate\Support\Facades\DB; #[OA\Schema( description: 'Private Key model', @@ -206,22 +205,6 @@ class PrivateKey extends BaseModel $this->delete(); } - private static function privateKeyExists($key) - { - $publicKey = self::extractPublicKeyFromPrivate($key->private_key); - if (!$publicKey) { - return false; - } - - $existingKey = DB::table('private_keys') - ->where('team_id', $key->team_id) - ->where('id', '!=', $key->id) - ->whereRaw('? = (SELECT public_key FROM private_keys WHERE id = private_keys.id)', [$publicKey]) - ->exists(); - - return $existingKey; - } - public static function generateFingerprint($privateKey) { try {