mirror of
https://github.com/wekan/wekan.git
synced 2026-02-20 23:14:07 +01:00
Return data on client (sync) and Promise on server (async) naturally, without wrapping in an extra Promise
This commit is contained in:
parent
2b15a8ff09
commit
f934aea2a5
21 changed files with 405 additions and 3760 deletions
|
|
@ -340,13 +340,14 @@ RulesHelper = {
|
|||
sort: 0,
|
||||
});
|
||||
const itemsArray = action.checklistItems.split(',');
|
||||
const checkList = await ReactiveCache.getChecklist(checkListId);
|
||||
const existingItems = await ReactiveCache.getChecklistItems({ checklistId: checkListId });
|
||||
const sortBase = existingItems.length;
|
||||
for (let i = 0; i < itemsArray.length; i++) {
|
||||
ChecklistItems.insert({
|
||||
title: itemsArray[i],
|
||||
checklistId: checkListId,
|
||||
cardId: card._id,
|
||||
sort: checkList.itemCount(),
|
||||
sort: sortBase + i,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue