rector: arrrrr

This commit is contained in:
Andras Bacsai
2025-01-07 14:52:08 +01:00
parent c702ebff6d
commit 16c0cd10d8
349 changed files with 4204 additions and 3712 deletions

View File

@@ -6,6 +6,7 @@ use App\Enums\ProxyTypes;
use App\Models\Server;
use Livewire\Component;
use Symfony\Component\Yaml\Yaml;
use Throwable;
class NewDynamicConfiguration extends Component
{
@@ -53,7 +54,7 @@ class NewDynamicConfiguration extends Component
if ($this->fileName === 'coolify.yaml') {
$this->dispatch('error', 'File name is reserved.');
return;
return null;
}
} elseif ($proxy_type === 'CADDY') {
if (! str($this->fileName)->endsWith('.caddy')) {
@@ -67,7 +68,7 @@ class NewDynamicConfiguration extends Component
if ($exists == 1) {
$this->dispatch('error', 'File already exists');
return;
return null;
}
}
if ($proxy_type === ProxyTypes::TRAEFIK->value) {
@@ -85,9 +86,11 @@ class NewDynamicConfiguration extends Component
$this->dispatch('loadDynamicConfigurations');
$this->dispatch('dynamic-configuration-added');
$this->dispatch('success', 'Dynamic configuration saved.');
} catch (\Throwable $e) {
} catch (Throwable $e) {
return handleError($e, $this);
}
return null;
}
public function render()