discourse/app/assets/javascripts/admin/models/admin_dashboard.js

14 lines
353 B
JavaScript

Discourse.AdminDashboard = Discourse.Model.extend({});
Discourse.AdminDashboard.reopenClass({
find: function() {
var model = Discourse.AdminDashboard.create();
return $.ajax("/admin/dashboard", {
type: 'GET',
success: function(json) {
model.mergeAttributes(json);
model.set('loaded', true);
}
});
}
});