mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-24 08:09:13 -05:00
Merge pull request #509 from wojciechka/master
Topic and admin dashboard not retrieving data properly when using prefix
This commit is contained in:
commit
97b2f5b86a
2 changed files with 3 additions and 3 deletions
|
@ -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) {
|
||||
|
|
|
@ -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 a new issue