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

11 lines
282 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;
async beforeModel(transition) {
this.session.requireAuthentication(transition, 'signin');
}
}