Some bug fixes
This commit is contained in:
parent
a1b490afa7
commit
a02ee3a08b
81 changed files with 337 additions and 1318 deletions
|
|
@ -22,7 +22,7 @@ module.exports = async (params, user) => new Promise(async (res, rej) => {
|
|||
if (newPasswordErr) return rej('invalid newPassword param');
|
||||
|
||||
// Compare password
|
||||
const same = await bcrypt.compare(currentPassword, user.account.password);
|
||||
const same = await bcrypt.compare(currentPassword, user.password);
|
||||
|
||||
if (!same) {
|
||||
return rej('incorrect password');
|
||||
|
|
@ -34,7 +34,7 @@ module.exports = async (params, user) => new Promise(async (res, rej) => {
|
|||
|
||||
await User.update(user._id, {
|
||||
$set: {
|
||||
'account.password': hash
|
||||
'password': hash
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue