Blame view
both/routes/authenticated.js
523 Bytes
6dd0ad2bb
|
1 2 3 4 5 6 7 8 9 |
const authenticatedRedirect = () => { if ( !Meteor.loggingIn() && !Meteor.userId() ) { FlowRouter.go( 'login' ); } }; const authenticatedRoutes = FlowRouter.group({ name: 'authenticated', triggersEnter: [ authenticatedRedirect ] |
77001041a
|
10 |
}); |
334a76815
|
11 |
authenticatedRoutes.route( '/', { |
77001041a
|
12 |
name: 'index', |
77001041a
|
13 14 15 16 |
action() { BlazeLayout.render( 'default', { yield: 'index' } ); } }); |
6dd0ad2bb
|
17 18 19 20 21 22 23 |
authenticatedRoutes.route( '/dashboard', { name: 'dashboard', action() { BlazeLayout.render( 'default', { yield: 'dashboard' } ); } }); |