Blame view
both/routes/authenticated.js
413 Bytes
77001041a
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
let authenticated = FlowRouter.group({ triggersEnter: [ () => { if ( !Meteor.loggingIn() && !Meteor.userId() ) { FlowRouter.go( 'login' ); Session.set( 'currentRoute', 'login' ); } }] }); authenticated.route( '/', { name: 'index', triggersEnter: [ () => { Session.set( 'currentRoute', 'index' ); }], action() { BlazeLayout.render( 'default', { yield: 'index' } ); } }); |