登录完成

This commit is contained in:
绯村月
2014-03-14 23:29:18 +08:00
parent 0171c4c918
commit de589f47d1
2 changed files with 1 additions and 2 deletions

View File

@@ -71,7 +71,7 @@ module.exports = class User extends Model
# @return bool
matchPasswd: (passwd) ->
return auth.hashPasswd(passwd, @data.passwd_salt) == @data.passwd
auth.hashPasswd(passwd, @data.passwd_salt) is @data.passwd
@byUsername: (username, callback) ->
@findOne

View File

@@ -10,7 +10,6 @@ $ ->
url: '/user/login/'
data: data
.done (reply) ->
console.log reply
location.href = '/'
.fail (reply) ->
if reply.status is 400