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:
Jarek Radosz
2020-03-26 21:00:10 +01:00
committed by GitHub
parent 17211b940f
commit 67b34600d5
27 changed files with 42 additions and 42 deletions

View File

@ -100,13 +100,11 @@ QUnit.test("creating simultaneously", assert => {
});
});
QUnit.test("destroyRecord", assert => {
QUnit.test("destroyRecord", async assert => {
const store = createStore();
return store.find("widget", 123).then(function(widget) {
widget.destroyRecord().then(function(result) {
assert.ok(result);
});
});
const widget = await store.find("widget", 123);
assert.ok(await widget.destroyRecord());
});
QUnit.test("custom api name", async assert => {