discourse/app/assets/javascripts/admin/routes/admin-email-preview-digest.js.es6
2018-06-15 17:03:24 +02:00

21 lines
468 B
JavaScript

import {
default as EmailPreview,
oneWeekAgo
} from "admin/models/email-preview";
export default Discourse.Route.extend({
model() {
return EmailPreview.findDigest(this.currentUser.get("username"));
},
afterModel(model) {
const controller = this.controllerFor("adminEmailPreviewDigest");
controller.setProperties({
model,
username: this.currentUser.get("username"),
lastSeen: oneWeekAgo(),
showHtml: true
});
}
});