forked from rakirox/meteor-collaborative-pomodoro-todo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pomo.js
39 lines (33 loc) · 912 Bytes
/
pomo.js
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
Router.configure({
layoutTemplate: 'Layout'
});
Router.route('/', function () {
if (!Meteor.user()) {
this.layout('Public');
this.render('Register');
}else{
Router.go('/dashboard');
}
});
Router.route('/dashboard', function () {
if (!Meteor.user()) Router.go('/');
if(!Session.get('currentProject')){
Session.set('currentProject', Projects.findOne());
}
else {
checkingProject = Session.get('currentProject');
if(typeof checkingProject === "undefined"){
project = Projects.findOne();
Session.set('currentProject', project);
}
}
this.render('Dashboard');
});
Router.route('/collaborative', function () {
// if (!Meteor.user()) Router.go('/');
if(typeof Session.get('currentProject') === "undefined"){
project = Projects.findOne();
Session.set('currentProject', project);
}
this.render('CollaborativeDashboard');
});