Minor fixes.
This commit is contained in:
parent
8ed912913d
commit
a3a87f54df
@ -69,6 +69,7 @@ $handleJsonRpcCall = (api, session, encodedRequest) ->
|
||||
catch error
|
||||
# If it is not a valid API error, hides it with a generic server error.
|
||||
unless ($_.isObject error) and (error not instanceof Error)
|
||||
console.error error.stack ? error
|
||||
error = $API.err.SERVER_ERROR
|
||||
|
||||
formatError error
|
||||
|
@ -77,7 +77,7 @@ class $User extends $Model
|
||||
|
||||
# Checks the password and updates the hash if necessary.
|
||||
checkPassword: (password) ->
|
||||
hash = @get 'hash'
|
||||
hash = @get 'pw_hash'
|
||||
|
||||
unless $verifyHash password, hash
|
||||
return false
|
||||
@ -126,12 +126,12 @@ class $XO
|
||||
@tokens = new $Tokens {
|
||||
connection: redis
|
||||
prefix: 'xo:token'
|
||||
indexes: ['host']
|
||||
indexes: ['user_id']
|
||||
}
|
||||
@users = new $Users {
|
||||
connection: redis
|
||||
prefix: 'xo:user'
|
||||
indexes: ['host']
|
||||
indexes: ['email']
|
||||
}
|
||||
|
||||
# Proxies tokens/users related events to XO and removes tokens
|
||||
|
Loading…
Reference in New Issue
Block a user