mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 02:23:40 +08:00
e5311ab645
* DEV: Discourse.Route -> DiscourseRoute with import * ran prettier on all routes * prettiered one more file
22 lines
524 B
JavaScript
22 lines
524 B
JavaScript
import DiscourseRoute from "discourse/routes/discourse";
|
|
import {
|
|
default as EmailPreview,
|
|
oneWeekAgo
|
|
} from "admin/models/email-preview";
|
|
|
|
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
|
|
});
|
|
}
|
|
});
|