DEV: migrate routes to the new @action pattern (#149)

This commit is contained in:
Andrei Prigorshnev 2022-01-06 12:16:51 +01:00 committed by GitHub
parent b8763be6d6
commit 58cfe737f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 10 deletions

View File

@ -1,5 +1,6 @@
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import DiscourseRoute from "discourse/routes/discourse"; import DiscourseRoute from "discourse/routes/discourse";
import { action } from "@ember/object";
export default DiscourseRoute.extend({ export default DiscourseRoute.extend({
controllerName: "group-reports-index", controllerName: "group-reports-index",
@ -29,10 +30,9 @@ export default DiscourseRoute.extend({
controller.setProperties(model); controller.setProperties(model);
}, },
actions: { @action
refreshModel() { refreshModel() {
this.refresh(); this.refresh();
return false; return false;
},
}, },
}); });

View File

@ -1,5 +1,6 @@
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import DiscourseRoute from "discourse/routes/discourse"; import DiscourseRoute from "discourse/routes/discourse";
import { action } from "@ember/object";
export default DiscourseRoute.extend({ export default DiscourseRoute.extend({
controllerName: "group-reports-show", controllerName: "group-reports-show",
@ -28,10 +29,9 @@ export default DiscourseRoute.extend({
controller.setProperties(model); controller.setProperties(model);
}, },
actions: { @action
refreshModel() { refreshModel() {
this.refresh(); this.refresh();
return false; return false;
},
}, },
}); });