2013-06-03 16:12:24 -04:00
|
|
|
/**
|
|
|
|
Our data model for showing a preview of an email
|
|
|
|
|
|
|
|
@class EmailPreview
|
|
|
|
@extends Discourse.Model
|
|
|
|
@namespace Discourse
|
|
|
|
@module Discourse
|
|
|
|
**/
|
|
|
|
Discourse.EmailPreview = Discourse.Model.extend({});
|
|
|
|
|
|
|
|
Discourse.EmailPreview.reopenClass({
|
|
|
|
findDigest: function(last_seen_at) {
|
2013-11-30 21:30:41 -05:00
|
|
|
return Discourse.ajax("/admin/email/preview-digest.json", {
|
2013-06-03 16:12:24 -04:00
|
|
|
data: {last_seen_at: last_seen_at}
|
|
|
|
}).then(function (result) {
|
|
|
|
return Discourse.EmailPreview.create(result);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
|