1
0
Fork 0
mirror of synced 2024-06-29 11:40:45 +12:00

Merge pull request #1818 from deshankoswatte/doc-1409-teams-membership-parameter-order

doc-1409-teams-membership-parameter-order
This commit is contained in:
Eldad A. Fux 2021-10-05 08:43:38 +03:00 committed by GitHub
commit 3d51eaba32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -262,9 +262,9 @@ App::post('/v1/teams/:teamId/memberships')
->label('abuse-limit', 10)
->param('teamId', '', new UID(), 'Team unique ID.')
->param('email', '', new Email(), 'New team member email.')
->param('name', '', new Text(128), 'New team member name. Max length: 128 chars.', true)
->param('roles', [], new ArrayList(new Key()), 'Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Max length for each role is 32 chars.')
->param('url', '', function ($clients) { return new Host($clients); }, 'URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.', false, ['clients']) // TODO add our own built-in confirm page
->param('name', '', new Text(128), 'New team member name. Max length: 128 chars.', true)
->inject('response')
->inject('project')
->inject('user')
@ -272,7 +272,7 @@ App::post('/v1/teams/:teamId/memberships')
->inject('locale')
->inject('audits')
->inject('mails')
->action(function ($teamId, $email, $name, $roles, $url, $response, $project, $user, $projectDB, $locale, $audits, $mails) {
->action(function ($teamId, $email, $roles, $url, $name, $response, $project, $user, $projectDB, $locale, $audits, $mails) {
/** @var Appwrite\Utopia\Response $response */
/** @var Appwrite\Database\Document $project */
/** @var Appwrite\Database\Document $user */