Remove unused code

This commit is contained in:
peaklabs-dev
2024-09-17 13:45:05 +02:00
parent 1c78067386
commit 43895419ff

View File

@@ -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 {