From 58cfe737f7eb3d401a059edc8d24ed0ec22fa2f7 Mon Sep 17 00:00:00 2001 From: Andrei Prigorshnev Date: Thu, 6 Jan 2022 12:16:51 +0100 Subject: [PATCH] DEV: migrate routes to the new @action pattern (#149) --- .../discourse/routes/group-reports-index.js.es6 | 10 +++++----- .../discourse/routes/group-reports-show.js.es6 | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/assets/javascripts/discourse/routes/group-reports-index.js.es6 b/assets/javascripts/discourse/routes/group-reports-index.js.es6 index fce105e..034b9fc 100644 --- a/assets/javascripts/discourse/routes/group-reports-index.js.es6 +++ b/assets/javascripts/discourse/routes/group-reports-index.js.es6 @@ -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; }, }); diff --git a/assets/javascripts/discourse/routes/group-reports-show.js.es6 b/assets/javascripts/discourse/routes/group-reports-show.js.es6 index a1b5c9a..f49b9fa 100644 --- a/assets/javascripts/discourse/routes/group-reports-show.js.es6 +++ b/assets/javascripts/discourse/routes/group-reports-show.js.es6 @@ -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; }, });