mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 05:56:16 +00:00
code style fix
add command tests
This commit is contained in:
@ -22,15 +22,15 @@ public function create(User $user, array $input): void
|
||||
'provider' => $input['provider'],
|
||||
'profile' => $input['name'],
|
||||
'credentials' => [
|
||||
'token' => $input['token']
|
||||
]
|
||||
'token' => $input['token'],
|
||||
],
|
||||
]);
|
||||
if (! $storageProvider->provider()->connect()) {
|
||||
throw ValidationException::withMessages([
|
||||
'token' => __("Couldn't connect to the provider")
|
||||
'token' => __("Couldn't connect to the provider"),
|
||||
]);
|
||||
}
|
||||
$storageProvider->save();;
|
||||
$storageProvider->save();
|
||||
}
|
||||
|
||||
private function validate(User $user, array $input): void
|
||||
@ -45,8 +45,8 @@ private function validate(User $user, array $input): void
|
||||
Rule::unique('storage_providers', 'profile')->where('user_id', $user->id),
|
||||
],
|
||||
'token' => [
|
||||
'required'
|
||||
]
|
||||
'required',
|
||||
],
|
||||
])->validate();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user