1
0
Fork 0
mirror of synced 2024-06-26 18:20:43 +12:00

Updated docs

This commit is contained in:
Eldad Fux 2020-05-31 01:24:05 +03:00
parent 61c54f2a12
commit e71a0f4be5
3 changed files with 9 additions and 9 deletions

View file

@ -57,7 +57,7 @@ $utopia->post('/v1/account')
->label('sdk.description', '/docs/references/account/create.md')
->label('abuse-limit', 10)
->param('email', '', function () { return new Email(); }, 'User email.')
->param('password', '', function () { return new Password(); }, 'User password.')
->param('password', '', function () { return new Password(); }, 'User password. Must be between 6 to 32 chars.')
->param('name', '', function () { return new Text(100); }, 'User name.', true)
->action(
function ($email, $password, $name) use ($register, $request, $response, $audit, $projectDB, $project, $webhook, $oauth2Keys) {
@ -158,7 +158,7 @@ $utopia->post('/v1/account/sessions')
->label('abuse-limit', 10)
->label('abuse-key', 'url:{url},email:{param-email}')
->param('email', '', function () { return new Email(); }, 'User email.')
->param('password', '', function () { return new Password(); }, 'User password.')
->param('password', '', function () { return new Password(); }, 'User password. Must be between 6 to 32 chars.')
->action(
function ($email, $password) use ($response, $request, $projectDB, $audit, $webhook) {
$protocol = Config::getParam('protocol');
@ -745,8 +745,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 user password.')
->param('oldPassword', '', function () { return new Password(); }, 'Old user password.')
->param('password', '', function () { return new Password(); }, 'New user password. Must be between 6 to 32 chars.')
->param('oldPassword', '', function () { return new Password(); }, 'Old user password. Must be between 6 to 32 chars.')
->action(
function ($password, $oldPassword) use ($response, $user, $projectDB, $audit, $oauth2Keys) {
if (!Auth::passwordVerify($oldPassword, $user->getAttribute('password'))) { // Double check user password
@ -788,7 +788,7 @@ $utopia->patch('/v1/account/email')
->label('sdk.method', 'updateEmail')
->label('sdk.description', '/docs/references/account/update-email.md')
->param('email', '', function () { return new Email(); }, 'User email.')
->param('password', '', function () { return new Password(); }, 'User password.')
->param('password', '', function () { return new Password(); }, 'User password. Must be between 6 to 32 chars.')
->action(
function ($email, $password) use ($response, $user, $projectDB, $audit, $oauth2Keys) {
if (!Auth::passwordVerify($password, $user->getAttribute('password'))) { // Double check user password
@ -1144,8 +1144,8 @@ $utopia->put('/v1/account/recovery')
->label('abuse-key', 'url:{url},userId:{param-userId}')
->param('userId', '', function () { return new UID(); }, 'User account UID address.')
->param('secret', '', function () { return new Text(256); }, 'Valid reset token.')
->param('password', '', function () { return new Password(); }, 'New password.')
->param('passwordAgain', '', function () {return new Password(); }, 'New password again.')
->param('password', '', function () { return new Password(); }, 'New password. Must be between 6 to 32 chars.')
->param('passwordAgain', '', function () {return new Password(); }, 'New password again. Must be between 6 to 32 chars.')
->action(
function ($userId, $secret, $password, $passwordAgain) use ($response, $projectDB, $audit) {
if ($password !== $passwordAgain) {

View file

@ -400,7 +400,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 user password for confirmation.')
->param('password', '', function () { return new UID(); }, 'Your user password for confirmation. Must be between 6 to 32 chars.')
->action(
function ($projectId, $password) use ($response, $consoleDB, $user, $deletes) {
if (!Auth::passwordVerify($password, $user->getAttribute('password'))) { // Double check user password

View file

@ -31,7 +31,7 @@ $utopia->post('/v1/users')
->label('sdk.method', 'create')
->label('sdk.description', '/docs/references/users/create-user.md')
->param('email', '', function () { return new Email(); }, 'User email.')
->param('password', '', function () { return new Password(); }, 'User password.')
->param('password', '', function () { return new Password(); }, 'User password. Must be between 6 to 32 chars.')
->param('name', '', function () { return new Text(100); }, 'User name.', true)
->action(
function ($email, $password, $name) use ($response, $projectDB) {