mirror of
https://github.com/wekan/wekan.git
synced 2025-04-20 12:07:11 -04:00
Models: Remove board from starred list
This will fix the starred counter. If the board is not public, the user is unable to see the board and remove it from the list of starred boards.
This commit is contained in:
parent
7b0e57380a
commit
4013184801
1 changed files with 12 additions and 0 deletions
|
@ -494,6 +494,18 @@ if (Meteor.isServer) {
|
|||
|
||||
const board = Boards._transform(doc);
|
||||
board.setWatcher(memberId, false);
|
||||
|
||||
// Remove board from users starred list
|
||||
if (!board.isPublic()) {
|
||||
Users.update(
|
||||
memberId,
|
||||
{
|
||||
$pull: {
|
||||
'profile.starredBoards': boardId,
|
||||
},
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue