wekan/server/publications/swimlanes.js

35 lines
740 B
JavaScript
Raw Normal View History

import { ReactiveCache } from '/imports/reactiveCache';
Meteor.methods({
2021-04-22 14:05:20 +02:00
copySwimlane(swimlaneId, toBoardId) {
check(swimlaneId, String);
check(toBoardId, String);
const swimlane = ReactiveCache.getSwimlane(swimlaneId);
const toBoard = ReactiveCache.getBoard(toBoardId);
2021-04-22 14:05:20 +02:00
if (swimlane && toBoard) {
swimlane.copy(toBoardId);
return true;
}
return false;
},
moveSwimlane(swimlaneId, toBoardId) {
check(swimlaneId, String);
check(toBoardId, String);
const swimlane = ReactiveCache.getSwimlane(swimlaneId);
const toBoard = ReactiveCache.getBoard(toBoardId);
if (swimlane && toBoard) {
2021-04-22 14:05:20 +02:00
swimlane.move(toBoardId);
return true;
}
return false;
},
});