mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-03 23:12:35 +00:00
#591 - ssh-keys
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
use App\Models\SshKey;
|
||||
use App\Models\User;
|
||||
use App\ValidationRules\SshKeyRule;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class CreateSshKey
|
||||
@ -16,6 +17,8 @@ class CreateSshKey
|
||||
*/
|
||||
public function create(User $user, array $input): SshKey
|
||||
{
|
||||
Validator::make($input, self::rules())->validate();
|
||||
|
||||
$key = new SshKey([
|
||||
'user_id' => $user->id,
|
||||
'name' => $input['name'],
|
||||
|
Reference in New Issue
Block a user