mirror of
https://github.com/discourse/discourse.git
synced 2024-12-11 16:13:44 +08:00
24 lines
614 B
JavaScript
24 lines
614 B
JavaScript
/**
|
|
Represents a URL that is watched for, and an action may be taken.
|
|
|
|
@class ScreenedUrl
|
|
@extends Discourse.Model
|
|
@namespace Discourse
|
|
@module Discourse
|
|
**/
|
|
Discourse.ScreenedUrl = Discourse.Model.extend({
|
|
actionName: function() {
|
|
return I18n.t("admin.logs.screened_actions." + this.get('action'));
|
|
}.property('action')
|
|
});
|
|
|
|
Discourse.ScreenedUrl.reopenClass({
|
|
findAll: function() {
|
|
return Discourse.ajax("/admin/logs/screened_urls.json").then(function(screened_urls) {
|
|
return screened_urls.map(function(b) {
|
|
return Discourse.ScreenedUrl.create(b);
|
|
});
|
|
});
|
|
}
|
|
});
|