mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 14:06:15 +00:00
- 2.x - sites (wip)
- improved ssh error handling - database soft deletes
This commit is contained in:
@ -3,7 +3,6 @@
|
||||
namespace App\Actions\Site;
|
||||
|
||||
use App\Models\Site;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class UpdateDeploymentScript
|
||||
@ -13,8 +12,6 @@ class UpdateDeploymentScript
|
||||
*/
|
||||
public function update(Site $site, array $input): void
|
||||
{
|
||||
$this->validate($input);
|
||||
|
||||
$site->deploymentScript()->update([
|
||||
'content' => $input['script'],
|
||||
]);
|
||||
@ -23,10 +20,10 @@ public function update(Site $site, array $input): void
|
||||
/**
|
||||
* @throws ValidationException
|
||||
*/
|
||||
protected function validate(array $input): void
|
||||
public static function rules(): array
|
||||
{
|
||||
Validator::make($input, [
|
||||
'script' => 'required',
|
||||
]);
|
||||
return [
|
||||
'script' => ['required', 'string'],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user