diff options
author | Justin Reynolds <justinr1234@gmail.com> | 2019-07-18 13:06:25 -0500 |
---|---|---|
committer | Justin Reynolds <justinr1234@gmail.com> | 2019-07-18 13:06:25 -0500 |
commit | 66b45ed35c2bd3768dd479bdc3b0e9988de7825b (patch) | |
tree | 09b1a3c2756ceb98224bc8a1dd6f4e1732570e71 /models/boards.js | |
parent | 34bd1e9c49c27bf112f02d6844e74101ab801f96 (diff) | |
download | wekan-66b45ed35c2bd3768dd479bdc3b0e9988de7825b.tar.gz wekan-66b45ed35c2bd3768dd479bdc3b0e9988de7825b.tar.bz2 wekan-66b45ed35c2bd3768dd479bdc3b0e9988de7825b.zip |
Fix invites
Diffstat (limited to 'models/boards.js')
-rw-r--r-- | models/boards.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/models/boards.js b/models/boards.js index 2346ecb6..2117ff7c 100644 --- a/models/boards.js +++ b/models/boards.js @@ -952,6 +952,19 @@ if (Meteor.isServer) { } else throw new Meteor.Error('error-board-notAMember'); } else throw new Meteor.Error('error-board-doesNotExist'); }, + acceptInvite(boardId) { + check(boardId, String); + const board = Boards.findOne(boardId); + if (!board) { + throw new Meteor.Error('error-board-doesNotExist'); + } + + Meteor.users.update(Meteor.userId(), { + $pull: { + 'profile.invitedBoards': boardId, + }, + }); + }, }); Meteor.methods({ |