1
0
Fork 0
mirror of synced 2024-07-01 20:50:49 +12:00

Apply suggestions from code review

Co-authored-by: Eldad A. Fux <eldad.fux@gmail.com>
This commit is contained in:
Damodar Lohani 2021-06-16 11:11:34 +05:45 committed by GitHub
parent 92d1ef4428
commit 94c91cc52a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();
});
});