mirror of
https://github.com/strapi/strapi.git
synced 2025-12-28 07:33:17 +00:00
[rename] changePassword > resetPassword for accuracy
Signed-off-by: ScottAgirs <scott@ijs.to>
This commit is contained in:
parent
1c0e1b99ed
commit
801224f2d9
@ -72,7 +72,7 @@
|
||||
{
|
||||
"method": "POST",
|
||||
"path": "/auth/reset-password",
|
||||
"handler": "Auth.changePassword"
|
||||
"handler": "Auth.resetPassword"
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
|
||||
@ -199,7 +199,7 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
|
||||
async changePassword(ctx) {
|
||||
async resetPassword(ctx) {
|
||||
const { password, passwordConfirmation, code } = {
|
||||
...ctx.request.body,
|
||||
...ctx.params,
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -177,7 +177,7 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
|
||||
async changePassword(ctx) {
|
||||
async resetPassword(ctx) {
|
||||
const params = _.assign({}, ctx.request.body, ctx.params);
|
||||
|
||||
if (
|
||||
|
||||
@ -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';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user