Blame view

both/routes/authenticated.js 425 Bytes
334a76815   Ryan Glover   little tasks and ...
1
  let authenticatedRoutes = FlowRouter.group({
77001041a   Ryan Glover   add support for F...
2
3
4
5
6
7
8
    triggersEnter: [ () => {
      if ( !Meteor.loggingIn() && !Meteor.userId() ) {
        FlowRouter.go( 'login' );
        Session.set( 'currentRoute', 'login' );
      }
    }]
  });
334a76815   Ryan Glover   little tasks and ...
9
  authenticatedRoutes.route( '/', {
77001041a   Ryan Glover   add support for F...
10
11
12
13
14
15
16
17
    name: 'index',
    triggersEnter: [ () => {
      Session.set( 'currentRoute', 'index' );
    }],
    action() {
      BlazeLayout.render( 'default', { yield: 'index' } );
    }
  });