From ec1905cf6fd24be8f08f4260841c5f36c9592eba Mon Sep 17 00:00:00 2001 From: David Taylor Date: Wed, 17 Jan 2024 13:49:59 +0000 Subject: [PATCH] FIX: "Action Logs" button on user admin page (#25300) The `transitionToRoute` API was removed in Ember 5 in favour of the route service --- .../javascripts/admin/addon/services/admin-tools.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/admin/addon/services/admin-tools.js b/app/assets/javascripts/admin/addon/services/admin-tools.js index 71c8955b1b7..14c969b5ccc 100644 --- a/app/assets/javascripts/admin/addon/services/admin-tools.js +++ b/app/assets/javascripts/admin/addon/services/admin-tools.js @@ -1,4 +1,3 @@ -import { getOwner } from "@ember/application"; import { action } from "@ember/object"; import Service, { inject as service } from "@ember/service"; import { htmlSafe } from "@ember/template"; @@ -14,13 +13,11 @@ import AdminUser from "admin/models/admin-user"; export default class AdminToolsService extends Service { @service dialog; @service modal; + @service router; showActionLogs(target, filters) { - const controller = getOwner(target).lookup( - "controller:adminLogs.staffActionLogs" - ); - target.transitionToRoute("adminLogs.staffActionLogs").then(() => { - controller.changeFilters(filters); + this.router.transitionTo("adminLogs.staffActionLogs", { + queryParams: { filters }, }); }