ui(server): fix used backup count
This commit is contained in:
parent
7e91a33a67
commit
f44833ca9c
6 changed files with 23 additions and 10 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue