1
0
mirror of synced 2026-08-04 09:26:54 +00:00

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
2 changed files with 10 additions and 10 deletions
@@ -1,5 +1,6 @@
import { ajax } from "discourse/lib/ajax";
import DiscourseRoute from "discourse/routes/discourse";
import { action } from "@ember/object";
export default DiscourseRoute.extend({
controllerName: "group-reports-index",
@@ -29,10 +30,9 @@ export default DiscourseRoute.extend({
controller.setProperties(model);
},
actions: {
refreshModel() {
this.refresh();
return false;
},
@action
refreshModel() {
this.refresh();
return false;
},
});
@@ -1,5 +1,6 @@
import { ajax } from "discourse/lib/ajax";
import DiscourseRoute from "discourse/routes/discourse";
import { action } from "@ember/object";
export default DiscourseRoute.extend({
controllerName: "group-reports-show",
@@ -28,10 +29,9 @@ export default DiscourseRoute.extend({
controller.setProperties(model);
},
actions: {
refreshModel() {
this.refresh();
return false;
},
@action
refreshModel() {
this.refresh();
return false;
},
});