2020-05-13 16:23:41 -04:00
|
|
|
import I18n from "I18n";
|
2019-10-29 15:23:50 -04:00
|
|
|
import EmberObject from "@ember/object";
|
2019-10-22 09:46:10 -04:00
|
|
|
import DiscourseRoute from "discourse/routes/discourse";
|
|
|
|
|
|
|
|
export default DiscourseRoute.extend({
|
2017-06-28 16:56:44 -04:00
|
|
|
model(params) {
|
|
|
|
this.controllerFor("adminWatchedWordsAction").set(
|
|
|
|
"actionNameKey",
|
|
|
|
params.action_id
|
|
|
|
);
|
|
|
|
let filteredContent = this.controllerFor("adminWatchedWordsAction").get(
|
|
|
|
"filteredContent"
|
2018-06-15 11:03:24 -04:00
|
|
|
);
|
2019-10-29 15:23:50 -04:00
|
|
|
return EmberObject.create({
|
2017-06-28 16:56:44 -04:00
|
|
|
nameKey: params.action_id,
|
|
|
|
name: I18n.t("admin.watched_words.actions." + params.action_id),
|
|
|
|
words: filteredContent,
|
|
|
|
});
|
|
|
|
},
|
|
|
|
});
|