2014-03-05 07:52:20 -05:00
|
|
|
Discourse.AdminBadgesRoute = Discourse.Route.extend({
|
|
|
|
|
|
|
|
model: function() {
|
2014-05-19 00:29:12 -04:00
|
|
|
return Discourse.Badge.findAll();
|
2014-03-05 07:52:20 -05:00
|
|
|
},
|
|
|
|
|
|
|
|
setupController: function(controller, model) {
|
|
|
|
Discourse.ajax('/admin/badges/types').then(function(json) {
|
|
|
|
controller.set('badgeTypes', json.badge_types);
|
|
|
|
});
|
|
|
|
controller.set('model', model);
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|