summaryrefslogtreecommitdiffstats
path: root/client/components/users/router.js
blob: d59e174d26398fcd8ebda3c0c47cf807513c85f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
_.each(['signIn', 'signUp', 'resetPwd',
  'forgotPwd', 'enrollAccount', 'changePwd'], function(routeName) {
  AccountsTemplates.configureRoute(routeName, {
    layoutTemplate: 'userFormsLayout'
  });
});

Router.route('/profile/:username', {
  name: 'Profile',
  template: 'profile',
  waitOn: function() {
    return Meteor.subscribe('profile', this.params.username);
  },
  data: function() {
    var params = this.params;
    return {
      profile: function() {
        return Users.findOne({ username: params.username });
      }
    };
  }
});

Router.route('/settings', {
  name: 'Settings',
  template: 'settings',
  layoutTemplate: 'AuthLayout'
});