mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-17 01:12:18 +00:00
fix(reset-password): use array for variables
This commit is contained in:
parent
1761752240
commit
29382d18f7
1 changed files with 5 additions and 5 deletions
|
|
@ -206,11 +206,11 @@ api.resetPassword = function(req, res, next){
|
|||
if (!user) return res.send(500, {err:"Couldn't find a user registered for email " + email});
|
||||
user.auth.local.salt = salt;
|
||||
user.auth.local.hashed_password = hashed_password;
|
||||
utils.txnEmail(user, 'reset-password', {
|
||||
NEW_PASSWORD: newPassword,
|
||||
URL: nconf.get('BASE_URL'),
|
||||
USERNAME: user.auth.local.username
|
||||
});
|
||||
utils.txnEmail(user, 'reset-password', [
|
||||
{name: "NEW_PASSWORD", content: newPassword},
|
||||
{name: "URL", content: nconf.get('BASE_URL')},
|
||||
{name: "USERNAME", content: user.auth.local.username}
|
||||
]);
|
||||
user.save(function(err){
|
||||
if(err) return next(err);
|
||||
res.send('New password sent to '+ email);
|
||||
|
|
|
|||
Loading…
Reference in a new issue