2015-03-02 12:12:19 -05: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 09:46:10 -04:00
|
|
|
import DiscourseRoute from "discourse/routes/discourse";
|
|
|
|
|
|
|
|
export default DiscourseRoute.extend({
|
2015-03-02 12:12:19 -05:00
|
|
|
beforeModel() {
|
2018-06-15 11:03:24 -04:00
|
|
|
this.replaceWith(
|
|
|
|
"adminSiteSettingsCategory",
|
2018-12-11 10:48:12 -05:00
|
|
|
this.controllerFor("adminSiteSettings").get("visibleSiteSettings")[0]
|
|
|
|
.nameKey
|
2018-06-15 11:03:24 -04:00
|
|
|
);
|
2015-03-02 12:12:19 -05:00
|
|
|
}
|
|
|
|
});
|