mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 01:43:45 +08:00
15 lines
370 B
JavaScript
15 lines
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);
|
|
}
|
|
}); |