feat(usage): cleanup comments
This commit is contained in:
parent
c36b5b8b30
commit
24925d2eb2
|
@ -249,7 +249,7 @@ App::get('/v1/database/collections/:collectionId')
|
|||
});
|
||||
|
||||
App::get('/v1/database/usage')
|
||||
->desc('Get Database Usage')
|
||||
->desc('Get usage stats for the database')
|
||||
->groups(['api', 'database'])
|
||||
->label('scope', 'collections.read')
|
||||
->label('sdk.auth', [APP_AUTH_TYPE_ADMIN])
|
||||
|
@ -258,7 +258,6 @@ App::get('/v1/database/usage')
|
|||
->param('range', '30d', new WhiteList(['24h', '7d', '30d', '90d'], true), 'Date range.', true)
|
||||
->inject('response')
|
||||
->inject('dbForInternal')
|
||||
->inject('register')
|
||||
->action(function ($range, $response, $dbForInternal) {
|
||||
/** @var Appwrite\Utopia\Response $response */
|
||||
/** @var Utopia\Database\Database $dbForConsole */
|
||||
|
@ -399,7 +398,7 @@ App::get('/v1/database/usage')
|
|||
|
||||
|
||||
App::get('/v1/database/:collectionId/usage')
|
||||
->desc('Get Database Usage for a collection')
|
||||
->desc('Get usage stats for a collection')
|
||||
->groups(['api', 'database'])
|
||||
->label('scope', 'collections.read')
|
||||
->label('sdk.auth', [APP_AUTH_TYPE_ADMIN])
|
||||
|
|
|
@ -645,7 +645,7 @@ App::delete('/v1/storage/files/:fileId')
|
|||
});
|
||||
|
||||
App::get('/v1/storage/:bucketId/usage')
|
||||
->desc('Get Bucket Usage')
|
||||
->desc('Get usage stats for a storage bucket')
|
||||
->groups(['api', 'storage'])
|
||||
->label('scope', 'storage.read')
|
||||
->label('sdk.auth', [APP_AUTH_TYPE_ADMIN])
|
||||
|
@ -660,6 +660,8 @@ App::get('/v1/storage/:bucketId/usage')
|
|||
/** @var Appwrite\Utopia\Response $response */
|
||||
/** @var Utopia\Database\Database $dbForInternal */
|
||||
|
||||
// TODO: Check is the storage bucket exists else throw 404
|
||||
|
||||
$stats = [];
|
||||
if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') {
|
||||
$period = [
|
||||
|
|
|
@ -610,7 +610,7 @@ App::delete('/v1/users/:userId')
|
|||
});
|
||||
|
||||
App::get('/v1/users/usage')
|
||||
->desc('Get Users Usage')
|
||||
->desc('Get usage stats for the users API')
|
||||
->groups(['api', 'users'])
|
||||
->label('scope', 'users.read')
|
||||
->label('sdk.auth', [APP_AUTH_TYPE_ADMIN])
|
||||
|
|
Loading…
Reference in a new issue