Fix email_preview AJAX call to use Discourse.ajax
This commit is contained in:
parent
f5d905c215
commit
761da7d380
|
@ -10,7 +10,7 @@ Discourse.EmailPreview = Discourse.Model.extend({});
|
||||||
|
|
||||||
Discourse.EmailPreview.reopenClass({
|
Discourse.EmailPreview.reopenClass({
|
||||||
findDigest: function(last_seen_at) {
|
findDigest: function(last_seen_at) {
|
||||||
return $.ajax("/admin/email/preview-digest.json", {
|
return Discourse.ajax("/admin/email/preview-digest.json", {
|
||||||
data: {last_seen_at: last_seen_at}
|
data: {last_seen_at: last_seen_at}
|
||||||
}).then(function (result) {
|
}).then(function (result) {
|
||||||
return Discourse.EmailPreview.create(result);
|
return Discourse.EmailPreview.create(result);
|
||||||
|
|
Loading…
Reference in New Issue