Use pushPayload instead of push
push doesn't normalize data, so it needs camelized properties etc.
This commit is contained in:
parent
429d580b00
commit
56f4be5bb1
|
@ -39,7 +39,7 @@ App = Ember.Application.extend(Ember.Evented,
|
|||
}
|
||||
delete(data.build.commit)
|
||||
|
||||
store.pushPayload(commit: [commit])
|
||||
store.pushPayload(commits: [commit])
|
||||
|
||||
if event == 'job:log'
|
||||
console.log 'store: received job:log event', data if Log.DEBUG
|
||||
|
|
|
@ -77,7 +77,7 @@ Auth = Ember.Object.extend
|
|||
|
||||
refreshUserData: (user) ->
|
||||
Travis.ajax.get "/users/#{user.id}", (data) =>
|
||||
@store.push('user', data.user)
|
||||
@store.pushPayload(users: [data.user])
|
||||
# if user is still signed in, update saved data
|
||||
if @get('signedIn')
|
||||
data.user.token = user.token
|
||||
|
@ -103,7 +103,7 @@ Auth = Ember.Object.extend
|
|||
storage.setItem('travis.user', JSON.stringify(data.user))
|
||||
|
||||
loadUser: (user) ->
|
||||
@store.push('user', user)
|
||||
@store.pushPayload(users: [user])
|
||||
user = @store.find('user', user.id)
|
||||
user.get('permissions')
|
||||
user
|
||||
|
|
Loading…
Reference in New Issue
Block a user