2019-10-22 21:46:10 +08:00
|
|
|
import DiscourseRoute from "discourse/routes/discourse";
|
2017-06-29 04:56:44 +08:00
|
|
|
import WatchedWord from "admin/models/watched-word";
|
|
|
|
|
2023-03-15 21:17:51 +08:00
|
|
|
export default class AdminWatchedWordsRoute extends DiscourseRoute {
|
|
|
|
queryParams = {
|
2017-06-29 04:56:44 +08:00
|
|
|
filter: { replace: true },
|
2023-03-15 21:17:51 +08:00
|
|
|
};
|
2017-06-29 04:56:44 +08:00
|
|
|
|
|
|
|
model() {
|
|
|
|
return WatchedWord.findAll();
|
2023-03-15 21:17:51 +08:00
|
|
|
}
|
2017-06-29 04:56:44 +08:00
|
|
|
|
2021-05-28 00:20:26 +08:00
|
|
|
afterModel(model) {
|
|
|
|
const controller = this.controllerFor("adminWatchedWords");
|
|
|
|
controller.set("allWatchedWords", model);
|
2023-03-15 21:17:51 +08:00
|
|
|
}
|
|
|
|
}
|