api(app): allow removing a server's startup command
This commit is contained in:
parent
34d20b2bf0
commit
5359ef8407
1 changed files with 7 additions and 2 deletions
|
@ -93,10 +93,15 @@ class StartupModificationService
|
|||
]);
|
||||
}
|
||||
|
||||
$startup = $server->startup;
|
||||
if (Arr::exists($data, 'startup')) {
|
||||
$startup = $data['startup'];
|
||||
}
|
||||
|
||||
$server->fill([
|
||||
'startup' => $data['startup'] ?? $server->startup,
|
||||
'startup' => $startup,
|
||||
'skip_scripts' => $data['skip_scripts'] ?? isset($data['skip_scripts']),
|
||||
'image' => $data['docker_image'] ?? $server->image,
|
||||
'image' => $data['image'] ?? $server->image,
|
||||
])->save();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue