fix seedBoxRecord

This commit is contained in:
xiaomlove
2025-02-07 20:25:43 +08:00
parent fd12d463b7
commit 53e167787c
3 changed files with 13 additions and 5 deletions

View File

@@ -22,7 +22,7 @@ class CreateSeedBoxRecord extends CreateRecord
$rep = new SeedBoxRepository();
try {
$this->record = $rep->store($data);
$this->notify('success', $this->getCreatedNotificationTitle());
send_admin_success_notification();
if ($another) {
// Ensure that the form record is anonymized so that relationships aren't loaded.
$this->form->model($this->record::class);
@@ -34,7 +34,7 @@ class CreateSeedBoxRecord extends CreateRecord
}
$this->redirect($this->getResource()::getUrl('index'));
} catch (\Exception $exception) {
$this->notify('danger', $exception->getMessage());
send_admin_fail_notification($exception->getMessage());
}
}
}