14 lines
406 B
JavaScript
Raw Normal View History

2018-06-15 17:03:24 +02:00
import RestModel from "discourse/models/rest";
import { ajax } from "discourse/lib/ajax";
import { getProperties } from "@ember/object";
2015-11-20 12:30:04 -05:00
export default class EmailTemplate extends RestModel {
2015-11-20 12:30:04 -05:00
revert() {
return ajax(`/admin/customize/email_templates/${this.id}`, {
type: "DELETE",
}).then((result) =>
2018-06-15 17:03:24 +02:00
getProperties(result.email_template, "subject", "body", "can_revert")
);
}
}