diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 2eca3f729..b24a5bb70 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -50,7 +50,7 @@ $utopia->post('/v1/account') ->label('sdk.method', 'create') ->label('sdk.description', '/docs/references/account/create.md') ->label('abuse-limit', 10) - ->param('email', '', function () { return new Email(); }, 'Account email.') + ->param('email', '', function () { return new Email(); }, 'User email.') ->param('password', '', function () { return new Password(); }, 'User password.') ->param('name', '', function () { return new Text(100); }, 'User name.', true) ->action( @@ -147,8 +147,8 @@ $utopia->post('/v1/account/sessions') ->label('sdk.description', '/docs/references/account/create-session.md') ->label('abuse-limit', 10) ->label('abuse-key', 'url:{url},email:{param-email}') - ->param('email', '', function () { return new Email(); }, 'User account email address.') - ->param('password', '', function () { return new Password(); }, 'User account password.') + ->param('email', '', function () { return new Email(); }, 'User email.') + ->param('password', '', function () { return new Password(); }, 'User password.') ->action( function ($email, $password) use ($response, $request, $projectDB, $audit, $webhook) { $profile = $projectDB->getCollection([ // Get user by email address @@ -669,8 +669,8 @@ $utopia->patch('/v1/account/password') ->label('sdk.namespace', 'account') ->label('sdk.method', 'updatePassword') ->label('sdk.description', '/docs/references/account/update-password.md') - ->param('password', '', function () { return new Password(); }, 'New password.') - ->param('old-password', '', function () { return new Password(); }, 'Old password.') + ->param('password', '', function () { return new Password(); }, 'New user password.') + ->param('old-password', '', function () { return new Password(); }, 'Old user password.') ->action( function ($password, $oldPassword) use ($response, $user, $projectDB, $audit, $oauthKeys) { if (!Auth::passwordVerify($oldPassword, $user->getAttribute('password'))) { // Double check user password @@ -710,7 +710,7 @@ $utopia->patch('/v1/account/email') ->label('sdk.namespace', 'account') ->label('sdk.method', 'updateEmail') ->label('sdk.description', '/docs/references/account/update-email.md') - ->param('email', '', function () { return new Email(); }, 'Email address.') + ->param('email', '', function () { return new Email(); }, 'User email.') ->param('password', '', function () { return new Password(); }, 'User password.') ->action( function ($email, $password) use ($response, $user, $projectDB, $audit, $oauthKeys) { @@ -976,7 +976,7 @@ $utopia->post('/v1/account/recovery') ->label('sdk.description', '/docs/references/account/create-recovery.md') ->label('abuse-limit', 10) ->label('abuse-key', 'url:{url},email:{param-email}') - ->param('email', '', function () { return new Email(); }, 'User account email address.') + ->param('email', '', function () { return new Email(); }, 'User email.') ->param('url', '', function () use ($clients) { return new Host($clients); }, 'URL to redirect the user back to your app from the recovery email.') ->action( function ($email, $url) use ($request, $response, $projectDB, $register, $audit, $project) { diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 9679a6832..36cd6081c 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -369,7 +369,7 @@ $utopia->delete('/v1/projects/:projectId') ->label('sdk.namespace', 'projects') ->label('sdk.method', 'delete') ->param('projectId', '', function () { return new UID(); }, 'Project unique ID.') - ->param('password', '', function () { return new UID(); }, 'Your Password for confirmation.') + ->param('password', '', function () { return new UID(); }, 'Your user password for confirmation.') ->action( function ($projectId, $password) use ($response, $consoleDB, $user) { if (!Auth::passwordVerify($password, $user->getAttribute('password'))) { // Double check user password diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 102189332..38654a015 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -208,7 +208,7 @@ $utopia->post('/v1/teams/:teamId/memberships') ->label('sdk.method', 'createMembership') ->label('sdk.description', '/docs/references/teams/create-team-membership.md') ->param('teamId', '', function () { return new UID(); }, 'Team unique ID.') - ->param('email', '', function () { return new Email(); }, 'New team member email address.') + ->param('email', '', function () { return new Email(); }, 'New team member email.') ->param('name', '', function () { return new Text(100); }, 'New team member name.', true) ->param('roles', [], function () { return new ArrayList(new Text(128)); }, '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).') ->param('url', '', function () use ($clients) { return new Host($clients); }, 'URL to redirect the user back to your app from the invitation email.') // TODO add our own built-in confirm page diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index 5d63b8dba..64f694fac 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -28,9 +28,9 @@ $utopia->post('/v1/users') ->label('sdk.namespace', 'users') ->label('sdk.method', 'create') ->label('sdk.description', '/docs/references/users/create-user.md') - ->param('email', '', function () { return new Email(); }, 'User account email.') - ->param('password', '', function () { return new Password(); }, 'User account password.') - ->param('name', '', function () { return new Text(100); }, 'User account name.', true) + ->param('email', '', function () { return new Email(); }, 'User email.') + ->param('password', '', function () { return new Password(); }, 'User password.') + ->param('name', '', function () { return new Text(100); }, 'User name.', true) ->action( function ($email, $password, $name) use ($response, $register, $projectDB, $providers) { $profile = $projectDB->getCollection([ // Get user by email address