mirror of
https://github.com/wekan/wekan.git
synced 2025-12-26 12:18:49 +01:00
32 lines
651 B
JavaScript
32 lines
651 B
JavaScript
Meteor.methods({
|
|
copySwimlane(swimlaneId, toBoardId) {
|
|
check(swimlaneId, String);
|
|
check(toBoardId, String);
|
|
|
|
const swimlane = Swimlanes.findOne(swimlaneId);
|
|
const toBoard = Boards.findOne(toBoardId);
|
|
|
|
if (swimlane && toBoard) {
|
|
swimlane.copy(toBoardId);
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
},
|
|
|
|
moveSwimlane(swimlaneId, toBoardId) {
|
|
check(swimlaneId, String);
|
|
check(toBoardId, String);
|
|
|
|
const swimlane = Swimlanes.findOne(swimlaneId);
|
|
const toBoard = Boards.findOne(toBoardId);
|
|
|
|
if (swimlane && toBoard) {
|
|
swimlane.move(toBoardId);
|
|
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
},
|
|
});
|