Merge pull request #509 from wojciechka/master

Topic and admin dashboard not retrieving data properly when using prefix
This commit is contained in:
Robin Ward 2013-03-21 10:58:13 -07:00
commit 97b2f5b86a
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) {

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