mirror of
https://github.com/wekan/wekan.git
synced 2026-01-26 19:26:09 +01:00
- Add Feature: Move board to Archive button at each board at All Boards page.
Thanks to xet7 ! Related #2389
This commit is contained in:
parent
7ff4067e88
commit
828f6ea321
4 changed files with 38 additions and 2 deletions
|
|
@ -867,6 +867,22 @@ if (Meteor.isServer) {
|
|||
} else throw new Meteor.Error('error-board-doesNotExist');
|
||||
},
|
||||
});
|
||||
|
||||
Meteor.methods({
|
||||
archiveBoard(boardId) {
|
||||
check(boardId, String);
|
||||
const board = Boards.findOne(boardId);
|
||||
if (board) {
|
||||
const userId = Meteor.userId();
|
||||
const index = board.memberIndex(userId);
|
||||
if (index >= 0) {
|
||||
board.archive();
|
||||
return true;
|
||||
} else throw new Meteor.Error('error-board-notAMember');
|
||||
} else throw new Meteor.Error('error-board-doesNotExist');
|
||||
},
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
if (Meteor.isServer) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue