discourse/app/assets/javascripts/admin/models/report.js
2013-03-09 15:34:27 -05:00

15 lines
No EOL
370 B
JavaScript

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