Ghost/ghost/admin/app/routes/authenticated.js

11 lines
276 B
JavaScript
Raw Normal View History

import Route from '@ember/routing/route';
import {inject as service} from '@ember/service';
export default class AuthenticatedRoute extends Route {
@service session;
beforeModel(transition) {
this.session.requireAuthentication(transition, 'signin');
}
}