cleanup before release (#391)

This commit is contained in:
Saeed Vaziry
2024-12-13 20:02:43 +01:00
committed by GitHub
parent d91fa4061c
commit 0d12dd0c69
27 changed files with 649 additions and 899 deletions

View File

@ -5,6 +5,7 @@
use App\Enums\FirewallRuleStatus;
use App\Enums\ServerProvider;
use App\Enums\ServerStatus;
use App\Enums\ServerType;
use App\Facades\Notifier;
use App\Models\Project;
use App\Models\Server;
@ -33,7 +34,7 @@ public function create(User $creator, Project $project, array $input): Server
'ip' => $input['ip'] ?? '',
'port' => $input['port'] ?? 22,
'os' => $input['os'],
'type' => $input['type'],
'type' => ServerType::REGULAR,
'provider' => $input['provider'],
'authentication' => [
'user' => config('core.ssh_user'),
@ -124,10 +125,6 @@ public static function rules(Project $project, array $input): array
'required',
Rule::in(config('core.operating_systems')),
],
'type' => [
'required',
Rule::in(config('core.server_types')),
],
'server_provider' => [
Rule::when(function () use ($input) {
return isset($input['provider']) && $input['provider'] != ServerProvider::CUSTOM;