REFACTOR: Remove Discourse.Ajax

This commit is contained in:
Robin Ward
2016-06-30 13:55:44 -04:00
parent 56f07529bb
commit b8125b3512
111 changed files with 567 additions and 549 deletions

View File

@ -1,3 +1,4 @@
import { ajax } from 'discourse/lib/ajax';
export default Ember.Component.extend({
classNames: ["ip-lookup"],
@ -23,7 +24,7 @@ export default Ember.Component.extend({
this.set("show", true);
if (!this.get("location")) {
Discourse.ajax("/admin/users/ip-info", {
ajax("/admin/users/ip-info", {
data: { ip: this.get("ip") }
}).then(function (location) {
self.set("location", Em.Object.create(location));
@ -39,7 +40,7 @@ export default Ember.Component.extend({
"order": "trust_level DESC"
};
Discourse.ajax("/admin/users/total-others-with-same-ip", { data }).then(function (result) {
ajax("/admin/users/total-others-with-same-ip", { data }).then(function (result) {
self.set("totalOthersWithSameIP", result.total);
});
@ -67,7 +68,7 @@ export default Ember.Component.extend({
totalOthersWithSameIP: null
});
Discourse.ajax("/admin/users/delete-others-with-same-ip.json", {
ajax("/admin/users/delete-others-with-same-ip.json", {
type: "DELETE",
data: {
"ip": self.get("ip"),