Template.pinAdd.events({
  'submit form': function(e) {
    e.preventDefault();
    var deviceId = Session.get('deviceID');
    Router.go('dashboard.device', {'_id': 'deviceId'});
  }
});



Template.pinAdd.events({
  'submit form': function(e) {
    e.preventDefault();
    var deviceId = Devices.findOne();
    var thisId = this._id;
    Router.go('dashboard.device');
  }
});



fix pin add route