mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-28 01:56:01 -05:00
26 lines
656 B
JavaScript
26 lines
656 B
JavaScript
/**
|
|
Represents an email address that is watched for during account registration,
|
|
and an action is taken.
|
|
|
|
@class BlockedEmail
|
|
@extends Discourse.Model
|
|
@namespace Discourse
|
|
@module Discourse
|
|
**/
|
|
Discourse.BlockedEmail = Discourse.Model.extend({
|
|
actionName: function() {
|
|
return I18n.t("admin.logs.actions." + this.get('action'));
|
|
}.property('action')
|
|
});
|
|
|
|
Discourse.BlockedEmail.reopenClass({
|
|
findAll: function(filter) {
|
|
return Discourse.ajax("/admin/logs/blocked_emails.json").then(function(blocked_emails) {
|
|
return blocked_emails.map(function(b) {
|
|
return Discourse.BlockedEmail.create(b);
|
|
})
|
|
});
|
|
}
|
|
});
|
|
|
|
|