Skip to content

Commit 0ce94a5

Browse files
committed
removed handleResetPassword from UsersRouter.js file
1 parent 344e139 commit 0ce94a5

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

src/Routers/UsersRouter.js

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -357,30 +357,6 @@ export class UsersRouter extends ClassesRouter {
357357
);
358358
}
359359

360-
handleResetPassword(req) {
361-
const { username, password, token } = req.body;
362-
if (!username) {
363-
throw new Parse.Error(Parse.Error.USERNAME_MISSING, 'you must provide a username');
364-
}
365-
if (!password) {
366-
throw new Parse.Error(Parse.Error.PASSWORD_MISSING, 'you must provide a password');
367-
}
368-
if (typeof password !== 'string' || typeof username !== 'string') {
369-
throw new Parse.Error(Parse.Error.OBJECT_NOT_FOUND, 'Invalid username/password.');
370-
}
371-
const userController = req.config.userController;
372-
return userController.updatePassword(username, token, password).then(
373-
() => {
374-
return Promise.resolve({
375-
response: {},
376-
});
377-
},
378-
err => {
379-
throw err;
380-
}
381-
);
382-
}
383-
384360
handleVerificationEmailRequest(req) {
385361
this._throwOnBadEmailConfig(req);
386362

@@ -447,9 +423,6 @@ export class UsersRouter extends ClassesRouter {
447423
this.route('POST', '/requestPasswordReset', req => {
448424
return this.handleResetRequest(req);
449425
});
450-
this.route('POST', '/resetPassword', req => {
451-
return this.handleResetPassword(req);
452-
});
453426
this.route('POST', '/verificationEmailRequest', req => {
454427
return this.handleVerificationEmailRequest(req);
455428
});

0 commit comments

Comments
 (0)