mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-03 20:31:50 -05:00
5c899c765b
This reverts commit c21457d6a7
.
26 lines
574 B
JavaScript
26 lines
574 B
JavaScript
import Group from 'discourse/models/group';
|
|
|
|
export default Discourse.Route.extend({
|
|
|
|
model: function(params) {
|
|
return Group.find(params.name);
|
|
},
|
|
|
|
serialize: function(model) {
|
|
return { name: model.get('name').toLowerCase() };
|
|
},
|
|
|
|
afterModel: function(model) {
|
|
var self = this;
|
|
return Group.findGroupCounts(model.get('name')).then(function (counts) {
|
|
self.set('counts', counts);
|
|
});
|
|
},
|
|
|
|
setupController: function(controller, model) {
|
|
controller.setProperties({
|
|
model: model,
|
|
counts: this.get('counts')
|
|
});
|
|
}
|
|
});
|