connect-nodejs icon indicating copy to clipboard operation
connect-nodejs copied to clipboard

Missing method for changing user's password

Open PetrSnobelt opened this issue 8 years ago • 1 comments

I try to use updateUser for changing user's password, but it don't work. Workaround is adding changePassword method into https://github.com/anvilresearch/connect-nodejs/blob/master/rest/users.js

something like this

function changePassword (id, password, options) {
  options = options || {}
  options.url = '/v1/users/' + id + '/password'
  options.method = 'PATCH'
  options.json = {password: password}
  return request.bind(this)(options)
}
exports.changePassword = changePassword

Please add it into some future release

PetrSnobelt avatar Jun 15 '16 20:06 PetrSnobelt