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

16 lines
396 B
JavaScript
Raw Normal View History

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