mirror of
https://github.com/discourse/discourse.git
synced 2024-12-03 14:24:00 +08:00
21 lines
494 B
JavaScript
21 lines
494 B
JavaScript
|
import Route from "@ember/routing/route";
|
||
|
import { inject as 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
|
||
|
);
|
||
|
}
|
||
|
}
|
||
|
}
|