Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this.route('editCarousel', {
- path: '/editCarousel',
- layoutTemplate: 'loggedInTemplate',
- yieldTemplate: 'editCarousel',
- onBeforeAction: function(pause) {
- if (!Meteor.userId()) {
- Router.go('/');
- } else if (!Meteor.user().hasOwnProperty('profile')) {
- Router.go('/detailspage');
- } else if (Meteor.user().hasOwnProperty('profile')) {
- if (!Meteor.user().profile.hasOwnProperty('duedate')) {
- Router.go('/detailspage');
- }
- else{
- this.next();
- }
- } else {
- this.next();
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement