2019-10-24 00:39:32 +08:00
|
|
|
import Route from "@ember/routing/route";
|
2023-07-19 03:52:55 +08:00
|
|
|
import { inject as service } from "@ember/service";
|
2023-03-15 21:17:51 +08:00
|
|
|
|
|
|
|
export default class AdminCustomizeIndexRoute extends Route {
|
2023-07-19 03:52:55 +08:00
|
|
|
@service router;
|
|
|
|
|
2015-08-07 00:14:59 +08:00
|
|
|
beforeModel() {
|
2021-04-23 21:21:45 +08:00
|
|
|
if (this.currentUser.admin) {
|
2023-07-19 03:52:55 +08:00
|
|
|
this.router.transitionTo("adminCustomizeThemes");
|
2021-04-23 21:21:45 +08:00
|
|
|
} else {
|
2023-07-19 03:52:55 +08:00
|
|
|
this.router.transitionTo("adminWatchedWords");
|
2021-04-23 21:21:45 +08:00
|
|
|
}
|
2023-03-15 21:17:51 +08:00
|
|
|
}
|
|
|
|
}
|