DEV: Remove unused raw-email code (#22364)
This code seems unused, since ~2016?
This commit is contained in:
parent
07bb4453d9
commit
e72153dd1a
|
@ -34,8 +34,4 @@ export default class IncomingEmail extends EmberObject {
|
|||
incomings.map((incoming) => IncomingEmail.create(incoming))
|
||||
);
|
||||
}
|
||||
|
||||
static loadRawEmail(id) {
|
||||
return ajax(`/admin/email/incoming/${id}/raw.json`);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import Controller from "@ember/controller";
|
||||
import IncomingEmail from "admin/models/incoming-email";
|
||||
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
||||
import Post from "discourse/models/post";
|
||||
import { equal } from "@ember/object/computed";
|
||||
|
@ -30,16 +29,6 @@ export default Controller.extend(ModalFunctionality, {
|
|||
);
|
||||
},
|
||||
|
||||
loadIncomingRawEmail(incomingEmailId) {
|
||||
return IncomingEmail.loadRawEmail(incomingEmailId).then((result) =>
|
||||
this.setProperties({
|
||||
rawEmail: result.raw_email,
|
||||
textPart: result.text_part,
|
||||
htmlPart: result.html_part,
|
||||
})
|
||||
);
|
||||
},
|
||||
|
||||
actions: {
|
||||
displayRaw() {
|
||||
this.set("tab", "raw");
|
||||
|
|
|
@ -177,13 +177,6 @@ class Admin::EmailController < Admin::AdminController
|
|||
end
|
||||
end
|
||||
|
||||
def raw_email
|
||||
params.require(:id)
|
||||
incoming_email = IncomingEmail.find(params[:id].to_i)
|
||||
text, html = Email.extract_parts(incoming_email.raw)
|
||||
render json: { raw_email: incoming_email.raw, text_part: text, html_part: html }
|
||||
end
|
||||
|
||||
def incoming
|
||||
params.require(:id)
|
||||
incoming_email = IncomingEmail.find(params[:id].to_i)
|
||||
|
|
|
@ -183,7 +183,6 @@ Discourse::Application.routes.draw do
|
|||
get "bounced"
|
||||
get "received"
|
||||
get "rejected"
|
||||
get "/incoming/:id/raw" => "email#raw_email"
|
||||
get "/incoming/:id" => "email#incoming"
|
||||
get "/incoming_from_bounced/:id" => "email#incoming_from_bounced"
|
||||
get "preview-digest" => "email#preview_digest"
|
||||
|
|
Loading…
Reference in New Issue