api(app): allow removing a server's startup command

This commit is contained in:
Matthew Penner 2021-11-04 11:47:08 -06:00
parent 34d20b2bf0
commit 5359ef8407
No known key found for this signature in database
GPG key ID: BAB67850901908A8

View file

@ -93,10 +93,15 @@ class StartupModificationService
]); ]);
} }
$startup = $server->startup;
if (Arr::exists($data, 'startup')) {
$startup = $data['startup'];
}
$server->fill([ $server->fill([
'startup' => $data['startup'] ?? $server->startup, 'startup' => $startup,
'skip_scripts' => $data['skip_scripts'] ?? isset($data['skip_scripts']), 'skip_scripts' => $data['skip_scripts'] ?? isset($data['skip_scripts']),
'image' => $data['docker_image'] ?? $server->image, 'image' => $data['image'] ?? $server->image,
])->save(); ])->save();
} }
} }