Skip to content

Commit

Permalink
修复登录错误
Browse files Browse the repository at this point in the history
  • Loading branch information
taska authored and taska committed Nov 30, 2014
1 parent de78132 commit de950fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blog/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,11 @@ module.exports = function(app) {
User.get_v2(name, function(err, user) {
if (!user) {
req.flash('error', '用户不存在');
res.redirect('/login');
return res.redirect('/login');
}
if (user.password !== password) {
req.flash('error', '密码错误');
res.redirect('/login');
return res.redirect('/login');
}
req.session.user = user;
req.flash('success', '登陆成功');
Expand Down

0 comments on commit de950fc

Please sign in to comment.