discourse/app/assets/javascripts/admin/addon/models/screened-url.js

22 lines
584 B
JavaScript
Raw Normal View History

import EmberObject from "@ember/object";
2018-06-15 10:03:24 -05:00
import { ajax } from "discourse/lib/ajax";
import discourseComputed from "discourse-common/utils/decorators";
import I18n from "discourse-i18n";
export default class ScreenedUrl extends EmberObject {
static findAll() {
return ajax("/admin/logs/screened_urls.json").then(function (
screened_urls
) {
return screened_urls.map(function (b) {
return ScreenedUrl.create(b);
2013-08-15 09:48:30 -05:00
});
});
}
@discourseComputed("action")
actionName(action) {
return I18n.t("admin.logs.screened_actions." + action);
}
}