2015-03-03 01:12:19 +08:00
|
|
|
/**
|
|
|
|
Handles when you click the Site Settings tab in admin, but haven't
|
|
|
|
chosen a category. It will redirect to the first category.
|
|
|
|
**/
|
2019-10-22 21:46:10 +08:00
|
|
|
import DiscourseRoute from "discourse/routes/discourse";
|
|
|
|
|
2023-03-15 21:17:51 +08:00
|
|
|
export default class AdminSiteSettingsIndexRoute extends DiscourseRoute {
|
2015-03-03 01:12:19 +08:00
|
|
|
beforeModel() {
|
|
|
|
this.replaceWith(
|
|
|
|
"adminSiteSettingsCategory",
|
2018-12-11 23:48:12 +08:00
|
|
|
this.controllerFor("adminSiteSettings").get("visibleSiteSettings")[0]
|
|
|
|
.nameKey
|
2015-03-03 01:12:19 +08:00
|
|
|
);
|
2023-03-15 21:17:51 +08:00
|
|
|
}
|
|
|
|
}
|