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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
509 B
Plaintext
Raw Normal View History

import DiscourseRoute from "discourse/routes/discourse";
import EmailPreview, { oneWeekAgo } from "admin/models/email-preview";
export default DiscourseRoute.extend({
2015-08-16 17:51:31 +08:00
model() {
return EmailPreview.findDigest(this.currentUser.get("username"));
2015-08-16 17:51:31 +08:00
},
afterModel(model) {
const controller = this.controllerFor("adminEmailPreviewDigest");
controller.setProperties({
model,
username: this.currentUser.get("username"),
lastSeen: oneWeekAgo(),
2015-08-16 17:51:31 +08:00
showHtml: true
});
}
});