mirror of
https://github.com/wekan/wekan.git
synced 2026-02-25 09:24:08 +01:00
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
This commit is contained in:
parent
2f6e34c5f5
commit
71eb01e233
81 changed files with 2218 additions and 2148 deletions
|
|
@ -11,17 +11,17 @@ Meteor.methods({
|
|||
let watchableObj = null;
|
||||
let board = null;
|
||||
if (watchableType === 'board') {
|
||||
watchableObj = ReactiveCache.getBoard(id);
|
||||
watchableObj = await ReactiveCache.getBoard(id);
|
||||
if (!watchableObj) throw new Meteor.Error('error-board-doesNotExist');
|
||||
board = watchableObj;
|
||||
} else if (watchableType === 'list') {
|
||||
watchableObj = ReactiveCache.getList(id);
|
||||
watchableObj = await ReactiveCache.getList(id);
|
||||
if (!watchableObj) throw new Meteor.Error('error-list-doesNotExist');
|
||||
board = watchableObj.board();
|
||||
board = await watchableObj.board();
|
||||
} else if (watchableType === 'card') {
|
||||
watchableObj = ReactiveCache.getCard(id);
|
||||
watchableObj = await ReactiveCache.getCard(id);
|
||||
if (!watchableObj) throw new Meteor.Error('error-card-doesNotExist');
|
||||
board = watchableObj.board();
|
||||
board = await watchableObj.board();
|
||||
} else {
|
||||
throw new Meteor.Error('error-json-schema');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue