discourse/app/assets/javascripts/admin/addon/routes/admin-customize-index.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
363 B
JavaScript
Raw Normal View History

import Route from "@ember/routing/route";
import { inject as service } from "@ember/service";
export default class AdminCustomizeIndexRoute extends Route {
@service router;
beforeModel() {
if (this.currentUser.admin) {
this.router.transitionTo("adminCustomizeThemes");
} else {
this.router.transitionTo("adminWatchedWords");
}
}
}