wekan/server/publications/swimlanes.js

33 lines
651 B
JavaScript
Raw Normal View History

Meteor.methods({
2021-04-22 14:05:20 +02:00
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) {
2021-04-22 14:05:20 +02:00
swimlane.move(toBoardId);
return true;
}
return false;
},
});