mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-25 23:21:58 +08:00
The Content section in particular has four tabs which are all site setting pages. It does not have one under /settings, like other sections. The admin search functionality will automatically use /settings for multi-tabbed sections. This results in a 404 when searching for Content site settings. This PR adds a front-end redirect (replaceWith) for /content/settings to fix the immediate issue.
14 lines
407 B
JavaScript
Vendored
14 lines
407 B
JavaScript
Vendored
import { service } from "@ember/service";
|
|
import DiscourseRoute from "discourse/routes/discourse";
|
|
|
|
export default class AdminConfigContentSettingsRoute extends DiscourseRoute {
|
|
@service router;
|
|
|
|
beforeModel(transition) {
|
|
let { queryParams } = transition.to;
|
|
|
|
if (transition.to.name !== "adminConfig.content") {
|
|
this.router.replaceWith("adminConfig.content", { queryParams });
|
|
}
|
|
}
|
|
}
|