Fix invites

This commit is contained in:
Justin Reynolds 2019-07-18 13:06:25 -05:00
parent 34bd1e9c49
commit 66b45ed35c
2 changed files with 15 additions and 2 deletions

View file

@ -82,13 +82,13 @@ BlazeComponent.extendComponent({
},
'click .js-accept-invite'() {
const boardId = this.currentData()._id;
Meteor.user().removeInvite(boardId);
Meteor.call('acceptInvite', boardId);
},
'click .js-decline-invite'() {
const boardId = this.currentData()._id;
Meteor.call('quitBoard', boardId, (err, ret) => {
if (!err && ret) {
Meteor.user().removeInvite(boardId);
Meteor.call('acceptInvite', boardId);
FlowRouter.go('home');
}
});