router problems

This commit is contained in:
Yaman Qalieh 2017-01-16 17:56:36 -05:00
parent 793a7ce03f
commit 2fc96ef4f9

View File

@ -1,8 +1,5 @@
function completeProfile() {
if (Meteor.user().profile.school &&
Meteor.user().profile.grade &&
Meteor.user().profile.classes.length > 1 &&
Meteor.user().profile.complete) {
if (Meteor.user().profile.complete) {
return true;
} else {
return false;
@ -12,8 +9,6 @@ function completeProfile() {
Router.route('/', {
waitOn: function() {
if (!Meteor.userId() || !completeProfile()) {
console.log("hello")
console.log(completeProfile());
this.redirect('/login');
} else {
return [