public.js
1.07 KB
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 publicRoutes = FlowRouter.group({
triggersEnter: [ () => {
if ( Meteor.userId() ) {
FlowRouter.go( 'index' );
Session.set( 'currentRoute', 'index' );
}
}]
});
publicRoutes.route( '/signup', {
name: 'signup',
triggersEnter: [ () => {
Session.set( 'currentRoute', 'signup' );
}],
action() {
BlazeLayout.render( 'default', { yield: 'signup' } );
}
});
publicRoutes.route( '/login', {
name: 'login',
triggersEnter: [ () => {
Session.set( 'currentRoute', 'login' );
}],
action() {
BlazeLayout.render( 'default', { yield: 'login' } );
}
});
publicRoutes.route( '/recover-password', {
name: 'recover-password',
triggersEnter: [ () => {
Session.set( 'currentRoute', 'recover-password' );
}],
action() {
BlazeLayout.render( 'default', { yield: 'recoverPassword' } );
}
});
publicRoutes.route( '/reset-password/:token', {
name: 'reset-password',
triggersEnter: [ () => {
Session.set( 'currentRoute', 'reset-password' );
}],
action() {
BlazeLayout.render( 'default', { yield: 'resetPassword' } );
}
});