discourse/app/assets/javascripts/admin/routes/admin_badges_route.js

15 lines
341 B
JavaScript
Raw Normal View History

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