mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 06:15:28 +08:00
FIX: admin reports were broken
This commit is contained in:
parent
6577f3c1ed
commit
ddd4500d7a
|
@ -147,7 +147,7 @@ Report.reopenClass({
|
|||
if (maxY > 0) {
|
||||
json.report.data.forEach(row => row.percentage = Math.round((row.y / maxY) * 100));
|
||||
}
|
||||
const model = Discourse.Report.create({ type: type });
|
||||
const model = Report.create({ type: type });
|
||||
model.setProperties(json.report);
|
||||
return model;
|
||||
});
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
**/
|
||||
export default Discourse.Route.extend({
|
||||
model: function(params) {
|
||||
return Discourse.Report.find(params.type);
|
||||
const Report = require('admin/models/report').default;
|
||||
return Report.find(params.type);
|
||||
},
|
||||
|
||||
setupController: function(controller, model) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user