Merge branch 'fix/backups' into v2

This commit is contained in:
Matthew Penner 2021-08-03 20:40:40 -06:00
commit 38ddcfb0d9
8 changed files with 54 additions and 10 deletions

View file

@ -25,7 +25,10 @@ class BackupRepository extends EloquentRepository
return $this->getBuilder()
->withTrashed()
->where('server_id', $server)
->where('is_successful', true)
->where(function ($query) {
$query->whereNull('completed_at')
->orWhere('is_successful', '=', true);
})
->where('created_at', '>=', Carbon::now()->subSeconds($seconds)->toDateTimeString())
->get()
->toBase();