FIX: Add ember redirect for tags/:tag_id -> tag/:tag_id (#17397)
/tags/:tag_id is deprecated, but links may exist in posts.
This commit is contained in:
parent
5a26c87fa6
commit
e91cc340e6
|
@ -248,6 +248,9 @@ export default function () {
|
|||
this.route("intersection", {
|
||||
path: "intersection/:tag_id/*additional_tags",
|
||||
});
|
||||
|
||||
// legacy route
|
||||
this.route("legacyRedirect", { path: "/:tag_id" });
|
||||
});
|
||||
|
||||
this.route(
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
import Route from "@ember/routing/route";
|
||||
|
||||
export default Route.extend({
|
||||
beforeModel() {
|
||||
this.transitionTo("tag.show", this.paramsFor("tags.legacyRedirect").tag_id);
|
||||
},
|
||||
});
|
Loading…
Reference in New Issue