discourse/app/assets/javascripts/admin/addon/routes/admin-email-preview-digest.js
David Taylor 48193767bf DEV: Sort imports
Automatically generated by `eslint --fix` to satisfy the updated configuration
2023-10-10 21:46:54 +01:00

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,
});
}
}