mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 04:52:52 +08:00
21 lines
468 B
JavaScript
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
|
|
});
|
|
}
|
|
});
|