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

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

19 lines
543 B
JavaScript
Raw Normal View History

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