topic and admin dashboard not retrieving data properly when using prefix

This commit is contained in:
Wojciech Kocjan 2013-03-21 16:24:05 +01:00
parent e3d30f1366
commit 910a622371
2 changed files with 3 additions and 3 deletions

View File

@ -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({
}
});
}
});
});

View File

@ -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) });
});
},