fix: backups

This commit is contained in:
Andras Bacsai
2024-04-29 09:38:45 +02:00
parent ae12222687
commit bb6c9cf49e
17 changed files with 71 additions and 96 deletions

View File

@@ -2,9 +2,7 @@
namespace App\Livewire\Project\Database;
use Illuminate\Support\Facades\Storage;
use Livewire\Component;
use Symfony\Component\HttpFoundation\StreamedResponse;
class BackupExecutions extends Component
{
@@ -16,11 +14,15 @@ class BackupExecutions extends Component
$userId = auth()->user()->id;
return [
"echo-private:team.{$userId},BackupCreated" => 'refreshBackupExecutions',
"refreshBackupExecutions",
"deleteBackup"
];
}
public function cleanupFailed()
{
$this->backup->executions()->where('status', 'failed')->delete();
$this->refreshBackupExecutions();
}
public function deleteBackup($exeuctionId)
{
$execution = $this->backup->executions()->where('id', $exeuctionId)->first();