fix: fqdn on apps

This commit is contained in:
Andras Bacsai 2023-08-27 14:55:57 +02:00
parent 35a75e1066
commit 932e58531d

View File

@ -139,10 +139,12 @@ public function submit()
ray($this->application);
try {
$this->validate();
$domains = Str::of($this->application->fqdn)->trim()->explode(',')->map(function ($domain) {
return Str::of($domain)->trim()->lower();
});
if (data_get($this->application,'fqdn')) {
$domains = Str::of($this->application->fqdn)->trim()->explode(',')->map(function ($domain) {
return Str::of($domain)->trim()->lower();
});
$this->application->fqdn = $domains->implode(',');
}
if ($this->application->dockerfile) {
$port = get_port_from_dockerfile($this->application->dockerfile);
if ($port) {
@ -155,7 +157,6 @@ public function submit()
if ($this->application->publish_directory && $this->application->publish_directory !== '/') {
$this->application->publish_directory = rtrim($this->application->publish_directory, '/');
}
$this->application->fqdn = $domains->implode(',');
$this->application->save();
$this->emit('success', 'Application settings updated!');
} catch (\Exception $e) {