mirror of
https://github.com/discourse/discourse.git
synced 2024-12-29 04:58:48 +08:00
48193767bf
Automatically generated by `eslint --fix` to satisfy the updated configuration
19 lines
543 B
JavaScript
19 lines
543 B
JavaScript
import DiscourseRoute from "discourse/routes/discourse";
|
|
import EmailPreview, { oneWeekAgo } from "admin/models/email-preview";
|
|
|
|
export default class AdminEmailPreviewDigestRoute extends DiscourseRoute {
|
|
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,
|
|
});
|
|
}
|
|
}
|