mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-03-28 23:49:11 +08:00
登录完成
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -10,7 +10,6 @@ $ ->
|
||||
url: '/user/login/'
|
||||
data: data
|
||||
.done (reply) ->
|
||||
console.log reply
|
||||
location.href = '/'
|
||||
.fail (reply) ->
|
||||
if reply.status is 400
|
||||
|
||||
Reference in New Issue
Block a user