Blame view
both/routes/public.js
1.04 KB
77001041a
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
let public = FlowRouter.group({ triggersEnter: [ () => { if ( Meteor.userId() ) { FlowRouter.go( 'index' ); Session.set( 'currentRoute', 'index' ); } }] }); public.route( '/signup', { name: 'signup', triggersEnter: [ () => { Session.set( 'currentRoute', 'signup' ); }], action() { BlazeLayout.render( 'default', { yield: 'signup' } ); } }); public.route( '/login', { name: 'login', triggersEnter: [ () => { Session.set( 'currentRoute', 'login' ); }], action() { BlazeLayout.render( 'default', { yield: 'login' } ); } }); public.route( '/recover-password', { name: 'recover-password', triggersEnter: [ () => { Session.set( 'currentRoute', 'recover-password' ); }], action() { BlazeLayout.render( 'default', { yield: 'recoverPassword' } ); } }); public.route( '/reset-password/:token', { name: 'reset-password', triggersEnter: [ () => { Session.set( 'currentRoute', 'reset-password' ); }], action() { BlazeLayout.render( 'default', { yield: 'resetPassword' } ); } }); |