mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 00:05:50 +08:00
038e5deb2a
* `@ember/owner` instead of `@ember/application` * `discourse-i18n` instead of `I18n` * `{ service } from "@ember/service"` instead of `inject as service`
21 lines
484 B
JavaScript
21 lines
484 B
JavaScript
import Route from "@ember/routing/route";
|
|
import { service } from "@ember/service";
|
|
|
|
export default class AdminPluginsShowIndexRoute extends Route {
|
|
@service router;
|
|
@service adminPluginNavManager;
|
|
|
|
model() {
|
|
return this.modelFor("adminPlugins.show");
|
|
}
|
|
|
|
afterModel(model) {
|
|
if (this.adminPluginNavManager.currentPluginDefaultRoute) {
|
|
this.router.replaceWith(
|
|
this.adminPluginNavManager.currentPluginDefaultRoute,
|
|
model.id
|
|
);
|
|
}
|
|
}
|
|
}
|