How to update records (API + Websocket)?

Hello!

Newbie here…

I’m trying to pull data in from a REST API and then live update the same data set with a websocket…but having an issue where nothing is showing up in my template, nor are both data sets being included when I look at the ember data inspector (either get the API - which has name, ID, kind - or websocket livestream - which has ID, device_count, and other fields).

Here’s a look at my code: http://jsbin.com/fesaz/4/edit

The JSON looks like: http://jsbin.com/levig/2/edit

Any thoughts where I’m going wrong?

Thanks! bpt

1 Like

If anyone’s following along, I popped a

model: function() {
return this.store.all('group');
}

in my index route, and now I can see records for a just a second from the API - but they are quickly replaced with records from the websocket livestream. Getting closer…?

duhhhhhh

store.update('group', data)

on the websocket. Yay!

1 Like