diff --git a/app/assets/javascripts/admin/models/admin_dashboard.js b/app/assets/javascripts/admin/models/admin_dashboard.js index 7d134c2fc33..453b9dd1638 100644 --- a/app/assets/javascripts/admin/models/admin_dashboard.js +++ b/app/assets/javascripts/admin/models/admin_dashboard.js @@ -3,7 +3,7 @@ Discourse.AdminDashboard = Discourse.Model.extend({}); Discourse.AdminDashboard.reopenClass({ find: function() { var model = Discourse.AdminDashboard.create(); - return $.ajax("/admin/dashboard", { + return $.ajax(Discourse.getURL("/admin/dashboard"), { type: 'GET', dataType: 'json', success: function(json) { @@ -12,4 +12,4 @@ Discourse.AdminDashboard.reopenClass({ } }); } -}); \ No newline at end of file +}); diff --git a/app/assets/javascripts/discourse/models/topic.js b/app/assets/javascripts/discourse/models/topic.js index c49c336e9cc..68b9f145e5d 100644 --- a/app/assets/javascripts/discourse/models/topic.js +++ b/app/assets/javascripts/discourse/models/topic.js @@ -389,7 +389,7 @@ Discourse.Topic.reopenClass({ @returns A promise that will resolve to the topics **/ findSimilarTo: function(title, body) { - return $.ajax({url: "/topics/similar_to", data: {title: title, raw: body} }).then(function (results) { + return $.ajax({url: Discourse.getURL("/topics/similar_to"), data: {title: title, raw: body} }).then(function (results) { return results.map(function(topic) { return Discourse.Topic.create(topic) }); }); },