We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f895ae6 commit 21aaf26Copy full SHA for 21aaf26
app/controllers/dashboard.js
@@ -38,8 +38,12 @@ export default Ember.Controller.extend({
38
var page = (this.get('myFeed').length / 10) + 1;
39
40
ajax('/me/updates?page=' + page).then((data) => {
41
- this.store.pushMany('crate', data.crates);
42
- var versions = this.store.pushMany('version', data.versions);
+ data.crates.forEach(crate =>
+ this.store.push(this.store.normalize('crate', crate)));
43
+
44
+ var versions = data.versions.map(version =>
45
+ this.store.push(this.store.normalize('version', version)));
46
47
this.get('myFeed').pushObjects(versions);
48
this.set('hasMore', data.meta.more);
49
}).finally(() => {
0 commit comments