diff --git a/hourglass/lib/router.js b/hourglass/lib/router.js index 5bdbcf9..990478a 100644 --- a/hourglass/lib/router.js +++ b/hourglass/lib/router.js @@ -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'])) {