[rename] changePassword > resetPassword for accuracy

Signed-off-by: ScottAgirs <scott@ijs.to>
This commit is contained in:
ScottAgirs 2020-03-30 15:13:27 -04:00
parent 1c0e1b99ed
commit 801224f2d9
5 changed files with 6 additions and 6 deletions

View File

@ -72,7 +72,7 @@
{
"method": "POST",
"path": "/auth/reset-password",
"handler": "Auth.changePassword"
"handler": "Auth.resetPassword"
},
{
"method": "GET",

View File

@ -199,7 +199,7 @@ module.exports = {
}
},
async changePassword(ctx) {
async resetPassword(ctx) {
const { password, passwordConfirmation, code } = {
...ctx.request.body,
...ctx.params,

View File

@ -260,11 +260,11 @@
{
"method": "POST",
"path": "/auth/reset-password",
"handler": "Auth.changePassword",
"handler": "Auth.resetPassword",
"config": {
"policies": ["plugins::users-permissions.ratelimit"],
"prefix": "",
"description": "Change a user's password",
"description": "Reset a user's password with a code (resetToken)",
"tag": {
"plugin": "users-permissions",
"name": "User"

View File

@ -177,7 +177,7 @@ module.exports = {
}
},
async changePassword(ctx) {
async resetPassword(ctx) {
const params = _.assign({}, ctx.request.body, ctx.params);
if (

View File

@ -362,7 +362,7 @@ module.exports = {
obj.type === 'users-permissions' &&
role.type === 'public';
const isNewPassword =
obj.action === 'changepassword' &&
obj.action === 'resetpassword' &&
obj.controller === 'auth' &&
obj.type === 'users-permissions' &&
role.type === 'public';