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