2015-08-08 02:05:08 +08:00
|
|
|
import RestModel from "discourse/models/rest";
|
2016-07-01 01:55:44 +08:00
|
|
|
import { ajax } from "discourse/lib/ajax";
|
2021-01-19 01:53:45 +08:00
|
|
|
import { getProperties } from "@ember/object";
|
2015-08-08 02:05:08 +08:00
|
|
|
|
2023-03-17 18:18:42 +08:00
|
|
|
export default class SiteText extends RestModel {
|
2021-01-19 01:53:45 +08:00
|
|
|
revert(locale) {
|
|
|
|
return ajax(`/admin/customize/site_texts/${this.id}?locale=${locale}`, {
|
2020-03-27 04:00:10 +08:00
|
|
|
type: "DELETE",
|
2015-11-24 05:45:05 +08:00
|
|
|
}).then((result) => getProperties(result.site_text, "value", "can_revert"));
|
2023-03-17 18:18:42 +08:00
|
|
|
}
|
|
|
|
}
|