mirror of
https://github.com/wekan/wekan.git
synced 2026-01-30 13:15:16 +01:00
Replace mquandalle:collection-mutations with collection helpers
This commit is contained in:
parent
aca661583d
commit
94a3575e2c
35 changed files with 718 additions and 1321 deletions
|
|
@ -152,17 +152,14 @@ CustomFields.addToAllCards = cf => {
|
|||
);
|
||||
};
|
||||
|
||||
CustomFields.mutations({
|
||||
addBoard(boardId) {
|
||||
CustomFields.helpers({
|
||||
async addBoard(boardId) {
|
||||
if (boardId) {
|
||||
return {
|
||||
$push: {
|
||||
boardIds: boardId,
|
||||
},
|
||||
};
|
||||
} else {
|
||||
return null;
|
||||
return await CustomFields.updateAsync(this._id, {
|
||||
$push: { boardIds: boardId },
|
||||
});
|
||||
}
|
||||
return null;
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue