From 374a570a35236d5c0e86d27084e57b98831f0f2c Mon Sep 17 00:00:00 2001 From: Yaman Qalieh Date: Mon, 5 Sep 2016 13:44:18 -0400 Subject: [PATCH] profile pages now work --- hourglass/lib/router.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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'])) {