From 94c91cc52a39a581e291cf24f4af24b601857cef Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Wed, 16 Jun 2021 11:11:34 +0545 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Eldad A. Fux --- app/controllers/api/storage.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 40f6e88bdf..638e80c944 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -32,7 +32,7 @@ App::post('/v1/storage/buckets') ->groups(['api', 'storage']) ->label('scope', 'buckets.write') ->label('event', 'storage.buckets.create') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) + ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'storage') ->label('sdk.method', 'createBucket') ->label('sdk.description', '/docs/references/storage/create-bucket.md') @@ -40,12 +40,12 @@ App::post('/v1/storage/buckets') ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_BUCKET) ->param('name', '', new Text(128), 'Bucket name', false) - ->param('maximumFileSize', 0, new Integer(), 'Maximum file size supported', true) + ->param('maximumFileSize', 0, new Integer(), 'Maximum file size allowed.', true) ->param('allowedFileExtensions', ['*'], new ArrayList(new Text(64)), 'Allowed file extensions', true) - ->param('enabled', true, new Boolean(), 'Bucket enabled', true) - ->param('adapter', 'local', new WhiteList(['local']), 'Storage adapter', true) - ->param('encryption', true, new Boolean(), 'encryption is enabled', true) - ->param('antiVirus', true, new Boolean(), 'Virus scanning is enabled', true) + ->param('enabled', true, new Boolean(), 'Is bucket enabled?', true) + ->param('adapter', 'local', new WhiteList(['local']), 'Storage adapter.', true) + ->param('encryption', true, new Boolean(), 'Is encryption enabled?', true) + ->param('antiVirus', true, new Boolean(), 'Is virus scanning enabled?', true) ->param('read', null, new ArrayList(new Text(64)), 'An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.', true) ->param('write', null, new ArrayList(new Text(64)), 'An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.', true) ->inject('response') @@ -685,4 +685,4 @@ App::delete('/v1/storage/files/:fileId') ; $response->noContent(); - }); \ No newline at end of file + });