2020-12-01 12:31:26 -06:00
|
|
|
import EmberObject from "@ember/object";
|
2018-06-15 10:03:24 -05:00
|
|
|
import { ajax } from "discourse/lib/ajax";
|
2020-12-01 12:31:26 -06:00
|
|
|
import discourseComputed from "discourse-common/utils/decorators";
|
2023-10-18 05:07:09 -05:00
|
|
|
import I18n from "discourse-i18n";
|
2019-04-26 05:16:21 -05:00
|
|
|
|
2023-03-17 05:18:42 -05:00
|
|
|
export default class ScreenedUrl extends EmberObject {
|
|
|
|
static findAll() {
|
2020-09-04 06:42:47 -05:00
|
|
|
return ajax("/admin/logs/screened_urls.json").then(function (
|
|
|
|
screened_urls
|
|
|
|
) {
|
|
|
|
return screened_urls.map(function (b) {
|
2015-11-20 19:27:06 -06:00
|
|
|
return ScreenedUrl.create(b);
|
2013-08-15 09:48:30 -05:00
|
|
|
});
|
|
|
|
});
|
2023-03-17 05:18:42 -05:00
|
|
|
}
|
2015-11-20 19:27:06 -06:00
|
|
|
|
2023-03-17 05:18:42 -05:00
|
|
|
@discourseComputed("action")
|
|
|
|
actionName(action) {
|
|
|
|
return I18n.t("admin.logs.screened_actions." + action);
|
|
|
|
}
|
|
|
|
}
|