mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 23:54:25 +08:00
48193767bf
Automatically generated by `eslint --fix` to satisfy the updated configuration
27 lines
762 B
JavaScript
27 lines
762 B
JavaScript
import { action } from "@ember/object";
|
|
import { inject as service } from "@ember/service";
|
|
import { popupAjaxError } from "discourse/lib/ajax-error";
|
|
import IncomingEmail from "admin/models/incoming-email";
|
|
import AdminEmailLogs from "admin/routes/admin-email-logs";
|
|
import IncomingEmailModal from "../components/modal/incoming-email";
|
|
|
|
export default class AdminEmailBouncedRoute extends AdminEmailLogs {
|
|
@service modal;
|
|
status = "bounced";
|
|
|
|
@action
|
|
async showIncomingEmail(id) {
|
|
const model = await this.loadFromBounced(id);
|
|
this.modal.show(IncomingEmailModal, { model });
|
|
}
|
|
|
|
@action
|
|
async loadFromBounced(id) {
|
|
try {
|
|
return await IncomingEmail.findByBounced(id);
|
|
} catch (error) {
|
|
popupAjaxError(error);
|
|
}
|
|
}
|
|
}
|