Some bug fixes

This commit is contained in:
syuilo
2018-04-08 03:58:11 +09:00
parent a1b490afa7
commit a02ee3a08b
81 changed files with 337 additions and 1318 deletions

View File

@@ -20,7 +20,7 @@ module.exports = async (params, user) => new Promise(async (res, rej) => {
if (passwordErr) return rej('invalid password param');
// Compare password
const same = await bcrypt.compare(password, user.account.password);
const same = await bcrypt.compare(password, user.password);
if (!same) {
return rej('incorrect password');
@@ -31,7 +31,7 @@ module.exports = async (params, user) => new Promise(async (res, rej) => {
await User.update(user._id, {
$set: {
'account.token': secret
'token': secret
}
});