Blame view
both/routes/public.js
774 Bytes
6dd0ad2bb
|
1 2 3 4 5 6 7 8 9 |
const publicRedirect = () => { if ( Meteor.userId() ) { FlowRouter.go( 'index' ); } }; const publicRoutes = FlowRouter.group({ name: 'public', triggersEnter: [ publicRedirect ] |
77001041a
|
10 |
}); |
334a76815
|
11 |
publicRoutes.route( '/signup', { |
77001041a
|
12 |
name: 'signup', |
77001041a
|
13 14 15 16 |
action() { BlazeLayout.render( 'default', { yield: 'signup' } ); } }); |
334a76815
|
17 |
publicRoutes.route( '/login', { |
77001041a
|
18 |
name: 'login', |
77001041a
|
19 20 21 22 |
action() { BlazeLayout.render( 'default', { yield: 'login' } ); } }); |
334a76815
|
23 |
publicRoutes.route( '/recover-password', { |
77001041a
|
24 |
name: 'recover-password', |
77001041a
|
25 26 27 28 |
action() { BlazeLayout.render( 'default', { yield: 'recoverPassword' } ); } }); |
334a76815
|
29 |
publicRoutes.route( '/reset-password/:token', { |
77001041a
|
30 |
name: 'reset-password', |
77001041a
|
31 32 33 34 |
action() { BlazeLayout.render( 'default', { yield: 'resetPassword' } ); } }); |