fix: smtp view

This commit is contained in:
Andras Bacsai
2023-09-15 11:28:44 +02:00
parent b07cc500e7
commit 019670d5d1
7 changed files with 59 additions and 65 deletions

View File

@@ -110,9 +110,6 @@ class EmailSettings extends Component
public function saveModel()
{
$this->team->save();
if (is_a($this->team, Team::class)) {
refreshSession();
}
$this->emit('success', 'Settings saved.');
}
public function submit()
@@ -141,10 +138,11 @@ class EmailSettings extends Component
try {
$this->resetErrorBag();
$this->validate([
'team.smtp_from_address' => 'required|email',
'team.smtp_from_name' => 'required',
'team.resend_api_key' => 'required'
]);
$this->team->save();
refreshSession();
$this->emit('success', 'Settings saved successfully.');
} catch (\Throwable $e) {
$this->team->resend_enabled = false;