2023-01-14 13:29:57 +01:00
|
|
|
import { ReactiveCache } from '/imports/reactiveCache';
|
|
|
|
|
|
2021-03-27 18:50:05 +02:00
|
|
|
Meteor.methods({
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
async copySwimlane(swimlaneId, toBoardId) {
|
2021-04-22 14:05:20 +02:00
|
|
|
check(swimlaneId, String);
|
|
|
|
|
check(toBoardId, String);
|
|
|
|
|
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
const swimlane = await ReactiveCache.getSwimlane(swimlaneId);
|
|
|
|
|
const toBoard = await ReactiveCache.getBoard(toBoardId);
|
2021-04-22 14:05:20 +02:00
|
|
|
|
2023-03-11 19:32:16 +01:00
|
|
|
let ret = false;
|
2021-04-22 14:05:20 +02:00
|
|
|
if (swimlane && toBoard) {
|
|
|
|
|
swimlane.copy(toBoardId);
|
2023-03-11 19:32:16 +01:00
|
|
|
ret = true;
|
2021-04-22 14:05:20 +02:00
|
|
|
}
|
|
|
|
|
|
2023-03-11 19:32:16 +01:00
|
|
|
return ret;
|
2021-04-22 14:05:20 +02:00
|
|
|
},
|
|
|
|
|
|
2026-01-21 19:22:54 +02:00
|
|
|
async moveSwimlane(swimlaneId, toBoardId) {
|
2021-03-27 18:50:05 +02:00
|
|
|
check(swimlaneId, String);
|
|
|
|
|
check(toBoardId, String);
|
|
|
|
|
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
const swimlane = await ReactiveCache.getSwimlane(swimlaneId);
|
|
|
|
|
const toBoard = await ReactiveCache.getBoard(toBoardId);
|
2021-03-27 18:50:05 +02:00
|
|
|
|
2023-03-11 19:32:16 +01:00
|
|
|
let ret = false;
|
2021-03-27 19:02:07 +02:00
|
|
|
if (swimlane && toBoard) {
|
2026-01-21 19:22:54 +02:00
|
|
|
await swimlane.move(toBoardId);
|
2021-03-27 18:50:05 +02:00
|
|
|
|
2023-03-11 19:32:16 +01:00
|
|
|
ret = true;
|
2021-03-27 18:50:05 +02:00
|
|
|
}
|
|
|
|
|
|
2023-03-11 19:32:16 +01:00
|
|
|
return ret;
|
2021-03-27 18:50:05 +02:00
|
|
|
},
|
|
|
|
|
});
|