discourse/app/assets/javascripts/admin/addon/routes/admin-plugins-show-index.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
484 B
JavaScript
Raw Normal View History

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
);
}
}
}