notherbase-fs 3.3.8 → 3.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/controllers/user.js +2 -2
- package/package.json +1 -1
package/controllers/user.js
CHANGED
|
@@ -114,12 +114,12 @@ export default class User {
|
|
|
114
114
|
let spirit = await req.db.User.recallOne(req.body.email);
|
|
115
115
|
|
|
116
116
|
if (check(res, spirit, "User not found.")) {
|
|
117
|
-
let passResult = await bcrypt.compare(req.body.password, spirit.
|
|
117
|
+
let passResult = await bcrypt.compare(req.body.password, spirit.data.password);
|
|
118
118
|
|
|
119
119
|
if (check(res, passResult, "Password doesn't match the email.")) {
|
|
120
120
|
req.session.currentUser = req.body.email;
|
|
121
121
|
|
|
122
|
-
success(res, "Logged in.", spirit.
|
|
122
|
+
success(res, "Logged in.", spirit.data.username);
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
}
|