From 74a159ab99a9a08d42d66b54cd66796b0eac7585 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sat, 13 Aug 2022 03:44:57 +0000 Subject: [PATCH] fix key --- app/controllers/api/storage.php | 2 +- tests/e2e/General/UsageTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 660d95c29..079807dee 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -1489,7 +1489,7 @@ App::get('/v1/storage/usage') $usage = new Document([ 'range' => $range, - 'filesStorage' => $stats['project.$all.storage.size'], + 'storage' => $stats['project.$all.storage.size'], 'filesCount' => $stats['files.$all.count.total'], 'bucketsCount' => $stats['buckets.$all.count.total'], 'bucketsCreate' => $stats['buckets.$all.requests.create'], diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index da4e4b0b0..3bf0fd365 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -208,7 +208,7 @@ class UsageTest extends Scope 'x-appwrite-mode' => 'admin' ])); $res = $res['body']; - $this->assertEquals($storageTotal, $res['filesStorage'][array_key_last($res['filesStorage'])]['value']); + $this->assertEquals($storageTotal, $res['storage'][array_key_last($res['storage'])]['value']); $this->assertEquals($bucketsCount, $res['bucketsCount'][array_key_last($res['bucketsCount'])]['value']); $this->assertEquals($bucketsRead, $res['bucketsRead'][array_key_last($res['bucketsRead'])]['value']); $this->assertEquals($bucketsCreate, $res['bucketsCreate'][array_key_last($res['bucketsCreate'])]['value']);