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

19 lines
401 B
JavaScript

import EmailPreview from 'admin/models/email-preview';
export default Discourse.Route.extend({
model() {
return EmailPreview.findDigest();
},
afterModel(model) {
const controller = this.controllerFor('adminEmailPreviewDigest');
controller.setProperties({
model: model,
lastSeen: moment().subtract(7, 'days').format('YYYY-MM-DD'),
showHtml: true
});
}
});