DEV: introduce `updateUrl` attribute to `theme-setting-editor` component.

This commit is contained in:
Vinoth Kannan 2020-02-04 15:19:17 +05:30
parent 14ae574bc5
commit e4f3244141
1 changed files with 3 additions and 1 deletions

View File

@ -2,12 +2,14 @@ import Component from "@ember/component";
import BufferedContent from "discourse/mixins/buffered-content";
import SettingComponent from "admin/mixins/setting-component";
import { ajax } from "discourse/lib/ajax";
import { url } from "discourse/lib/computed";
export default Component.extend(BufferedContent, SettingComponent, {
layoutName: "admin/templates/components/site-setting",
updateUrl: url("model.id", "/admin/themes/%@/setting"),
_save() {
return ajax(`/admin/themes/${this.model.id}/setting`, {
return ajax(this.updateUrl, {
type: "PUT",
data: {
name: this.setting.setting,