DEV: upgrade transitionToRoute on Controller (#22647)

Per https://deprecations.emberjs.com/v3.x/#toc_routing-transition-methods

We are upgrading all `this.transitionToRoute` calls on controllers to directly call the router service (`this.router.transitionTo`)
This commit is contained in:
Isaac Janzen
2023-07-18 14:53:23 -05:00
committed by GitHub
parent 011ba5b9f6
commit a2ea9c5417
25 changed files with 93 additions and 33 deletions

View File

@ -21,6 +21,7 @@ const THEME_UPLOAD_VAR = 2;
export default class AdminCustomizeThemesShowController extends Controller {
@service dialog;
@service router;
editRouteName = "adminCustomizeThemes.edit";
@ -226,7 +227,7 @@ export default class AdminCustomizeThemesShowController extends Controller {
}
transitionToEditRoute() {
this.transitionToRoute(
this.router.transitionTo(
this.editRouteName,
this.get("model.id"),
"common",
@ -383,7 +384,7 @@ export default class AdminCustomizeThemesShowController extends Controller {
model.setProperties({ recentlyInstalled: false });
model.destroyRecord().then(() => {
this.allThemes.removeObject(model);
this.transitionToRoute("adminCustomizeThemes");
this.router.transitionTo("adminCustomizeThemes");
});
},
});