Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ajax password reset #5332

Merged
merged 22 commits into from
Mar 14, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spec/ValidationAndPasswordsReset.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ describe('Custom Pages, Email Verification, Password Reset', () => {
} catch (error) {
expect(error.status).not.toBe(302);
expect(error.text).toEqual(
'{"code":-1,"error":"Failed to reset password (Username/email or token is invalid)"}'
'{"code":-1,"error":"Failed to reset password: username / email / token is invalid"}'
);
}
});
Expand Down
2 changes: 1 addition & 1 deletion src/Controllers/UserController.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export class UserController extends AdaptableController {
)
.then(results => {
if (results.length != 1) {
throw undefined;
Copy link
Contributor

@acinader acinader Mar 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did a little git blame sleuthing on this one.

git show 7e868b2

note the comment that used to be there:

       // Trying to verify email when not enabled
       // TODO: Better error here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't even notice that.

throw 'Failed to reset password: username / email / token is invalid';
}

if (
Expand Down
5 changes: 0 additions & 5 deletions src/Routers/PublicAPIRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,6 @@ export class PublicAPIRouter extends PromiseRouter {
}
if (result.err) {
throw new Parse.Error(Parse.Error.OTHER_CAUSE, `${result.err}`);
dplewis marked this conversation as resolved.
Show resolved Hide resolved
} else {
throw new Parse.Error(
Parse.Error.OTHER_CAUSE,
'Failed to reset password (Username/email or token is invalid)'
);
}
}

Expand Down