mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
19 lines
459 B
JavaScript
19 lines
459 B
JavaScript
Discourse.AdminBadgesRoute = Discourse.Route.extend({
|
|
|
|
model: function() {
|
|
return Discourse.Badge.findAll().then(function(badges) {
|
|
return badges.filter(function(badge) {
|
|
return badge.id >= 100;
|
|
});
|
|
});
|
|
},
|
|
|
|
setupController: function(controller, model) {
|
|
Discourse.ajax('/admin/badges/types').then(function(json) {
|
|
controller.set('badgeTypes', json.badge_types);
|
|
});
|
|
controller.set('model', model);
|
|
}
|
|
|
|
});
|