mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 02:23:40 +08:00
22 lines
489 B
JavaScript
22 lines
489 B
JavaScript
/**
|
|
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) {
|
|
return Discourse.ajax("/admin/email/preview-digest.json", {
|
|
data: {last_seen_at: last_seen_at}
|
|
}).then(function (result) {
|
|
return Discourse.EmailPreview.create(result);
|
|
});
|
|
}
|
|
});
|
|
|
|
|