discourse/app/assets/javascripts/wizard/addon/routes/wizard-index.js
David Taylor b3d1707b65
DEV: Refactor Wizard routes, controllers and templates (#24725)
Extracted from https://github.com/discourse/discourse/pull/23678

Co-authored-by: Godfrey Chan <godfreykfc@gmail.com>
2023-12-06 12:07:07 +00:00

12 lines
319 B
JavaScript

import { inject as service } from "@ember/service";
import DiscourseRoute from "discourse/routes/discourse";
export default class WizardIndexRoute extends DiscourseRoute {
@service router;
beforeModel() {
const wizard = this.modelFor("wizard");
this.router.replaceWith("wizard.step", wizard.start);
}
}