topic and admin dashboard not retrieving data properly when using prefix
This commit is contained in:
parent
e3d30f1366
commit
910a622371
|
@ -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({
|
|||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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) });
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue