mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Finish renaming blocked emails to screen emails
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
/**
|
||||
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.blocked_emails.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);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
24
app/assets/javascripts/admin/models/screened_email.js
Normal file
24
app/assets/javascripts/admin/models/screened_email.js
Normal file
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
Represents an email address that is watched for during account registration,
|
||||
and an action is taken.
|
||||
|
||||
@class ScreenedEmail
|
||||
@extends Discourse.Model
|
||||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
Discourse.ScreenedEmail = Discourse.Model.extend({
|
||||
actionName: function() {
|
||||
return I18n.t("admin.logs.screened_emails.actions." + this.get('action'));
|
||||
}.property('action')
|
||||
});
|
||||
|
||||
Discourse.ScreenedEmail.reopenClass({
|
||||
findAll: function(filter) {
|
||||
return Discourse.ajax("/admin/logs/screened_emails.json").then(function(screened_emails) {
|
||||
return screened_emails.map(function(b) {
|
||||
return Discourse.ScreenedEmail.create(b);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user