DEV: Convert to native class syntax (#110)
This commit is contained in:
parent
5c64887dc9
commit
ff810c65d8
|
@ -1,9 +1,9 @@
|
||||||
import RestAdapter from "discourse/adapters/rest";
|
import RestAdapter from "discourse/adapters/rest";
|
||||||
import { ajax } from "discourse/lib/ajax";
|
import { ajax } from "discourse/lib/ajax";
|
||||||
|
|
||||||
export default RestAdapter.extend({
|
export default class UserNote extends RestAdapter {
|
||||||
destroyRecord(store, type, record) {
|
destroyRecord(store, type, record) {
|
||||||
const path = this.pathFor(store, type, record.id);
|
const path = this.pathFor(store, type, record.id);
|
||||||
return ajax(`${path}?user_id=${record.user_id}`, { method: "DELETE" });
|
return ajax(`${path}?user_id=${record.user_id}`, { method: "DELETE" });
|
||||||
},
|
}
|
||||||
});
|
}
|
||||||
|
|
Loading…
Reference in New Issue