ui(server): fix used backup count

This commit is contained in:
Matthew Penner 2021-08-04 17:22:57 -06:00
parent 7e91a33a67
commit f44833ca9c
No known key found for this signature in database
GPG key ID: 5396CC4C3C1C9704
6 changed files with 23 additions and 10 deletions

View file

@ -58,7 +58,7 @@ class BackupController extends ClientApiController
}
/**
* Returns all of the backups for a given server instance in a paginated
* Returns all the backups for a given server instance in a paginated
* result set.
*
* @throws \Illuminate\Auth\Access\AuthorizationException
@ -73,6 +73,9 @@ class BackupController extends ClientApiController
return $this->fractal->collection($server->backups()->paginate($limit))
->transformWith($this->getTransformer(BackupTransformer::class))
->addMeta([
'used_backup_count' => $this->initiateBackupService->getNonFailedBackups($server)->count(),
])
->toArray();
}