mirror of
https://github.com/discourse/discourse.git
synced 2024-12-16 04:53:58 +08:00
19 lines
511 B
JavaScript
19 lines
511 B
JavaScript
import EmailPreview, { oneWeekAgo } from "admin/models/email-preview";
|
|
import DiscourseRoute from "discourse/routes/discourse";
|
|
|
|
export default DiscourseRoute.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,
|
|
});
|
|
},
|
|
});
|