mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 22:18:08 +08:00
DEV: apply new coding standards (#10592)
This commit is contained in:
@ -14,14 +14,14 @@ export default Controller.extend(bufferedProperty("model"), {
|
||||
save() {
|
||||
this.setProperties({
|
||||
isSaving: true,
|
||||
saved: false
|
||||
saved: false,
|
||||
});
|
||||
|
||||
ajax("robots.json", {
|
||||
type: "PUT",
|
||||
data: { robots_txt: this.buffered.get("robots_txt") }
|
||||
data: { robots_txt: this.buffered.get("robots_txt") },
|
||||
})
|
||||
.then(data => {
|
||||
.then((data) => {
|
||||
this.commitBuffer();
|
||||
this.set("saved", true);
|
||||
this.set("model.overridden", data.overridden);
|
||||
@ -32,16 +32,16 @@ export default Controller.extend(bufferedProperty("model"), {
|
||||
reset() {
|
||||
this.setProperties({
|
||||
isSaving: true,
|
||||
saved: false
|
||||
saved: false,
|
||||
});
|
||||
ajax("robots.json", { type: "DELETE" })
|
||||
.then(data => {
|
||||
.then((data) => {
|
||||
this.buffered.set("robots_txt", data.robots_txt);
|
||||
this.commitBuffer();
|
||||
this.set("saved", true);
|
||||
this.set("model.overridden", false);
|
||||
})
|
||||
.finally(() => this.set("isSaving", false));
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
|
Reference in New Issue
Block a user