mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-28 10:08:20 -05:00
fa8a84f20c
bring in latest ace from local so we don't mess up with https
32 lines
682 B
JavaScript
32 lines
682 B
JavaScript
/**
|
|
Our data model for representing an email log.
|
|
|
|
@class EmailLog
|
|
@extends Discourse.Model
|
|
@namespace Discourse
|
|
@module Discourse
|
|
**/
|
|
Discourse.EmailLog = Discourse.Model.extend({});
|
|
|
|
Discourse.EmailLog.reopenClass({
|
|
create: function(attrs) {
|
|
if (attrs.user) {
|
|
attrs.user = Discourse.AdminUser.create(attrs.user);
|
|
}
|
|
return this._super(attrs);
|
|
},
|
|
|
|
findAll: function(filter) {
|
|
var result = Em.A();
|
|
Discourse.ajax("/admin/email/logs.json", {
|
|
data: { filter: filter }
|
|
}).then(function(logs) {
|
|
_.each(logs,function(log) {
|
|
result.pushObject(Discourse.EmailLog.create(log));
|
|
});
|
|
});
|
|
return result;
|
|
}
|
|
});
|
|
|
|
|