mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 01:31:35 +08:00
DEV: Use type
instead of method
in ajax calls (#8974)
Even though `type` is an alias for `method`, we have custom logic in `/discourse/lib/ajax` that checks only `type`, and ~200 other ajax calls in the codebase already use `type` param.
This commit is contained in:
@ -18,7 +18,7 @@ export default Controller.extend(bufferedProperty("model"), {
|
||||
});
|
||||
|
||||
ajax("robots.json", {
|
||||
method: "PUT",
|
||||
type: "PUT",
|
||||
data: { robots_txt: this.buffered.get("robots_txt") }
|
||||
})
|
||||
.then(data => {
|
||||
@ -34,7 +34,7 @@ export default Controller.extend(bufferedProperty("model"), {
|
||||
isSaving: true,
|
||||
saved: false
|
||||
});
|
||||
ajax("robots.json", { method: "DELETE" })
|
||||
ajax("robots.json", { type: "DELETE" })
|
||||
.then(data => {
|
||||
this.buffered.set("robots_txt", data.robots_txt);
|
||||
this.commitBuffer();
|
||||
|
Reference in New Issue
Block a user