discourse/app/assets/javascripts/admin/routes/admin-email-preview-digest.js.es6

19 lines
401 B
Plaintext
Raw Normal View History

2016-04-01 05:33:25 +08:00
import EmailPreview from 'admin/models/email-preview';
2015-08-16 17:51:31 +08:00
export default Discourse.Route.extend({
model() {
2016-04-01 05:33:25 +08:00
return EmailPreview.findDigest();
2015-08-16 17:51:31 +08:00
},
afterModel(model) {
const controller = this.controllerFor('adminEmailPreviewDigest');
controller.setProperties({
model: model,
lastSeen: moment().subtract(7, 'days').format('YYYY-MM-DD'),
showHtml: true
});
}
});