discourse/app/assets/javascripts/admin/addon/routes/admin-watched-words.js
Bianca Nenciu b56e9ad656
DEV: Simplify watched word code (#13103)
* DEV: Use site setting instead

* DEV: Use .length instead of a different property

* DEV: Simplify watched word code
2021-05-27 19:20:26 +03:00

18 lines
397 B
JavaScript

import DiscourseRoute from "discourse/routes/discourse";
import WatchedWord from "admin/models/watched-word";
export default DiscourseRoute.extend({
queryParams: {
filter: { replace: true },
},
model() {
return WatchedWord.findAll();
},
afterModel(model) {
const controller = this.controllerFor("adminWatchedWords");
controller.set("allWatchedWords", model);
},
});