signOut on refresh user data error
This commit is contained in:
parent
433f5b7318
commit
1d06666357
|
@ -82,6 +82,8 @@
|
|||
data.user.token = user.token
|
||||
@storeData(data, Travis.sessionStorage)
|
||||
@storeData(data, Travis.storage)
|
||||
, (data, status, xhr) =>
|
||||
@signOut()
|
||||
|
||||
signedIn: ->
|
||||
@get('state') == 'signed-in'
|
||||
|
|
|
@ -7,8 +7,8 @@ Travis.ajax = Em.Object.create
|
|||
accepts:
|
||||
json: 'application/json; version=2'
|
||||
|
||||
get: (url, callback) ->
|
||||
@ajax(url, 'get', success: callback)
|
||||
get: (url, callback, errorCallback) ->
|
||||
@ajax(url, 'get', success: callback, error: errorCallback)
|
||||
|
||||
post: (url, data, callback) ->
|
||||
@ajax(url, 'post', data: data, success: callback)
|
||||
|
|
Loading…
Reference in New Issue
Block a user