Skip to content

Commit 6a4e76a

Browse files
committed
Replace deprecated store.metadataFor() calls
1 parent e739a51 commit 6a4e76a

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

app/controllers/crate/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default Ember.Controller.extend({
4242
return DS.PromiseArray.create({
4343
promise: this.get('currentVersion.authors').then((authors) => {
4444
var ret = authors.slice();
45-
var others = this.store.metadataFor('user');
45+
var others = authors.get('meta');
4646
for (var i = 0; i < others.names.length; i++) {
4747
ret.push({name: others.names[i]});
4848
}

app/controllers/crate/reverse-dependencies.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ export default Ember.Controller.extend(PaginationMixin, {
99
per_page: 10,
1010

1111
totalItems: computed('model', function() {
12-
return this.store.metadataFor('dependency').total;
12+
return this.get('model.meta').total;
1313
})
1414
});

app/controllers/crates.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default Ember.Controller.extend(PaginationMixin, {
1414
showSortBy: false,
1515

1616
totalItems: computed('model', function() {
17-
return this.store.metadataFor('crate').total;
17+
return this.get('model.meta').total;
1818
}),
1919

2020
currentSortBy: computed('sort', function() {

app/controllers/keyword/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default Ember.Controller.extend(PaginationMixin, {
1212
showSortBy: false,
1313

1414
totalItems: computed('model', function() {
15-
return this.store.metadataFor('crate').total;
15+
return this.get('model.meta').total;
1616
}),
1717

1818
currentSortBy: computed('sort', function() {

app/controllers/keywords.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default Ember.Controller.extend(PaginationMixin, {
1212
showSortBy: false,
1313

1414
totalItems: computed('model', function() {
15-
return this.store.metadataFor('keyword').total;
15+
return this.get('model.meta').total;
1616
}),
1717

1818
currentSortBy: computed('sort', function() {

app/controllers/me/crates.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default Ember.Controller.extend(PaginationMixin, {
1313
showSortBy: false,
1414

1515
totalItems: computed('model', function() {
16-
return this.store.metadataFor('crate').total;
16+
return this.get('model.meta').total;
1717
}),
1818

1919
currentSortBy: computed('sort', function() {

app/controllers/me/following.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default Ember.Controller.extend(PaginationMixin, {
1313
showSortBy: false,
1414

1515
totalItems: computed('model', function() {
16-
return this.store.metadataFor('crate').total;
16+
return this.get('model.meta').total;
1717
}),
1818

1919
currentSortBy: computed('sort', function() {

app/controllers/search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ export default Ember.Controller.extend(PaginationMixin, {
1414
}),
1515

1616
totalItems: computed('model', function() {
17-
return this.store.metadataFor('crate').total;
17+
return this.get('model.meta').total;
1818
})
1919
});

app/routes/crate/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default Ember.Route.extend({
5858
return controller.get('model.version_downloads');
5959
}
6060
}).then((downloads) => {
61-
var meta = controller.store.metadataFor('version_download');
61+
var meta = downloads.get('meta');
6262
controller.set('fetchingDownloads', false);
6363
controller.send('renderChart', downloads, meta.extra_downloads);
6464
});

0 commit comments

Comments
 (0)