fix: team error
This commit is contained in:
@@ -46,6 +46,7 @@ class DiscordSettings extends Component
|
||||
public function saveModel()
|
||||
{
|
||||
$this->team->save();
|
||||
refreshSession();
|
||||
$this->emit('success', 'Settings saved.');
|
||||
}
|
||||
|
||||
|
||||
@@ -62,6 +62,7 @@ class EmailSettings extends Component
|
||||
'team.smtp_from_name' => 'required',
|
||||
]);
|
||||
$this->team->save();
|
||||
refreshSession();
|
||||
$this->emit('success', 'Settings saved successfully.');
|
||||
} catch (\Throwable $e) {
|
||||
return handleError($e, $this);
|
||||
@@ -81,6 +82,7 @@ class EmailSettings extends Component
|
||||
$this->team->smtp_enabled = false;
|
||||
$this->team->resend_enabled = false;
|
||||
$this->team->save();
|
||||
refreshSession();
|
||||
$this->emit('success', 'Settings saved successfully.');
|
||||
} catch (\Throwable $e) {
|
||||
return handleError($e, $this);
|
||||
@@ -110,6 +112,7 @@ class EmailSettings extends Component
|
||||
public function saveModel()
|
||||
{
|
||||
$this->team->save();
|
||||
refreshSession();
|
||||
$this->emit('success', 'Settings saved.');
|
||||
}
|
||||
public function submit()
|
||||
@@ -127,6 +130,7 @@ class EmailSettings extends Component
|
||||
'team.smtp_timeout' => 'nullable',
|
||||
]);
|
||||
$this->team->save();
|
||||
refreshSession();
|
||||
$this->emit('success', 'Settings saved successfully.');
|
||||
} catch (\Throwable $e) {
|
||||
$this->team->smtp_enabled = false;
|
||||
@@ -143,6 +147,7 @@ class EmailSettings extends Component
|
||||
'team.resend_api_key' => 'required'
|
||||
]);
|
||||
$this->team->save();
|
||||
refreshSession();
|
||||
$this->emit('success', 'Settings saved successfully.');
|
||||
} catch (\Throwable $e) {
|
||||
$this->team->resend_enabled = false;
|
||||
|
||||
@@ -52,6 +52,7 @@ class TelegramSettings extends Component
|
||||
public function saveModel()
|
||||
{
|
||||
$this->team->save();
|
||||
refreshSession();
|
||||
$this->emit('success', 'Settings saved.');
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ class Form extends Component
|
||||
$this->validate();
|
||||
try {
|
||||
$this->team->save();
|
||||
refreshSession();
|
||||
} catch (\Throwable $e) {
|
||||
return handleError($e, $this);
|
||||
}
|
||||
|
||||
@@ -21,9 +21,9 @@ class Team extends Model implements SendsDiscord, SendsEmail
|
||||
|
||||
protected static function booted()
|
||||
{
|
||||
static::saved(function () {
|
||||
refreshSession();
|
||||
});
|
||||
// static::saved(function () {
|
||||
// refreshSession();
|
||||
// });
|
||||
}
|
||||
|
||||
public function routeNotificationForDiscord()
|
||||
|
||||
Reference in New Issue
Block a user