discourse/app/assets/javascripts/admin/routes/admin_badges_route.js
2014-03-14 21:49:26 +05:30

14 lines
341 B
JavaScript

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);
}
});