mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-26 09:08:32 -05:00
b9a7d945c3
Start work on triggers
18 lines
510 B
JavaScript
18 lines
510 B
JavaScript
Discourse.AdminBadgesRoute = Discourse.Route.extend({
|
|
|
|
model: function() {
|
|
return Discourse.Badge.findAll();
|
|
},
|
|
|
|
setupController: function(controller, model) {
|
|
// TODO build into findAll
|
|
Discourse.ajax('/admin/badges/groupings').then(function(json) {
|
|
controller.set('badgeGroupings', json.badge_groupings);
|
|
});
|
|
Discourse.ajax('/admin/badges/types').then(function(json) {
|
|
controller.set('badgeTypes', json.badge_types);
|
|
});
|
|
controller.set('model', model);
|
|
}
|
|
|
|
});
|