Blame view
both/routes/configure.js
441 Bytes
77001041a
|
1 2 3 4 5 |
FlowRouter.notFound = { action() { BlazeLayout.render( 'default', { yield: 'notFound' } ); } }; |
6dd0ad2bb
|
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
Accounts.onLogin( () => { let currentRoute = FlowRouter.current(); if ( currentRoute && currentRoute.route.group.name === 'public' ) { FlowRouter.go( 'index' ); } }); if ( Meteor.isClient ) { Tracker.autorun( () => { if ( !Meteor.userId() && FlowRouter.current().route ) { FlowRouter.go( 'login' ); } }); } |