2013-06-03 16:12:24 -04:00
|
|
|
/**
|
|
|
|
Handles routes for admin reports
|
|
|
|
|
|
|
|
@class AdminReportsRoute
|
|
|
|
@extends Discourse.Route
|
|
|
|
@namespace Discourse
|
|
|
|
@module Discourse
|
|
|
|
**/
|
2015-11-20 20:27:06 -05:00
|
|
|
export default Discourse.Route.extend({
|
2013-02-27 22:39:42 -05:00
|
|
|
model: function(params) {
|
2015-12-01 18:31:30 -05:00
|
|
|
const Report = require('admin/models/report').default;
|
|
|
|
return Report.find(params.type);
|
2014-11-05 14:46:27 -05:00
|
|
|
},
|
|
|
|
|
|
|
|
setupController: function(controller, model) {
|
|
|
|
controller.setProperties({
|
|
|
|
model: model,
|
2015-07-03 13:12:40 -04:00
|
|
|
categoryId: 'all',
|
2014-11-05 14:46:27 -05:00
|
|
|
startDate: moment(model.get('start_date')).format('YYYY-MM-DD'),
|
|
|
|
endDate: moment(model.get('end_date')).format('YYYY-MM-DD')
|
|
|
|
});
|
2013-02-27 22:39:42 -05:00
|
|
|
}
|
2014-06-10 11:54:38 -04:00
|
|
|
});
|