fix(sentinel): Add missing instantSave method and prevent duplicate notifications (#7749)

This commit is contained in:
Andras Bacsai 2025-12-23 15:36:30 +01:00 committed by GitHub
commit 85629c57d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -110,26 +110,6 @@ public function restartSentinel()
}
}
public function updatedIsSentinelDebugEnabled($value)
{
try {
$this->submit();
$this->restartSentinel();
} catch (\Throwable $e) {
return handleError($e, $this);
}
}
public function updatedIsMetricsEnabled($value)
{
try {
$this->submit();
$this->restartSentinel();
} catch (\Throwable $e) {
return handleError($e, $this);
}
}
public function updatedIsSentinelEnabled($value)
{
try {
@ -175,6 +155,16 @@ public function submit()
}
}
public function instantSave()
{
try {
$this->syncData(true);
$this->restartSentinel();
} catch (\Throwable $e) {
return handleError($e, $this);
}
}
public function render()
{
return view('livewire.server.sentinel');