api refactoring

This commit is contained in:
Čarodej
2022-05-11 09:19:55 +02:00
parent d2371e667f
commit 70901a2df5
59 changed files with 861 additions and 578 deletions

View File

@@ -30,7 +30,7 @@ class UserStorageResource extends JsonResource
'type' => 'storage',
'attributes' => [
'used' => Metric::bytes($this->usedCapacity)->format(),
'capacity' => format_gigabytes($totalCapacity),
'capacity' => toGigabytes($totalCapacity),
'percentage' => (float) get_storage_percentage($this->usedCapacity, $totalCapacity),
],
'meta' => [