Merge pull request #8255 from appwrite/feat-update-pwd-abuse

Feat update pwd abuse
This commit is contained in:
Jake Barnby 2024-06-11 16:56:21 +12:00 committed by GitHub
commit e195018abd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2524,6 +2524,7 @@ App::patch('/v1/account/password')
->label('sdk.response.model', Response::MODEL_USER)
->label('sdk.offline.model', '/account')
->label('sdk.offline.key', 'current')
->label('abuse-limit', 10)
->param('password', '', fn ($project, $passwordsDictionary) => new PasswordDictionary($passwordsDictionary, $project->getAttribute('auths', [])['passwordDictionary'] ?? false), 'New user password. Must be at least 8 chars.', false, ['project', 'passwordsDictionary'])
->param('oldPassword', '', new Password(), 'Current user password. Must be at least 8 chars.', true)
->inject('requestTimestamp')