profile pages now work

This commit is contained in:
Yaman Qalieh 2016-09-05 13:44:18 -04:00
parent 3a9fd1ed0d
commit 374a570a35

View File

@ -46,6 +46,18 @@ Router.route('/profile', {
}
});
Router.route('/user/:email', {
template: 'user',
data: function() {
return Meteor.users.findOne({'services.google.email': this.params.email});
},
waitOn: function() {
return [
Meteor.subscribe('users', this.params._id)
];
}
});
Router.route('/admin', {
waitOn: function() {
if (Roles.userIsInRole(Meteor.userId(), ['admin', 'superadmin'])) {