mirror of
https://github.com/wekan/wekan.git
synced 2026-03-10 23:52:34 +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
|
|
@ -181,7 +181,7 @@ export class TrelloCreator {
|
|||
}
|
||||
|
||||
// You must call parseActions before calling this one.
|
||||
createBoardAndLabels(trelloBoard) {
|
||||
async createBoardAndLabels(trelloBoard) {
|
||||
let color = 'blue';
|
||||
if (this.getColor(trelloBoard.prefs.background) !== undefined) {
|
||||
color = this.getColor(trelloBoard.prefs.background);
|
||||
|
|
@ -207,7 +207,7 @@ export class TrelloCreator {
|
|||
permission: this.getPermission(trelloBoard.prefs.permissionLevel),
|
||||
slug: getSlug(trelloBoard.name) || 'board',
|
||||
stars: 0,
|
||||
title: Boards.uniqueTitle(trelloBoard.name),
|
||||
title: await Boards.uniqueTitle(trelloBoard.name),
|
||||
};
|
||||
// now add other members
|
||||
if (trelloBoard.memberships) {
|
||||
|
|
@ -779,7 +779,7 @@ export class TrelloCreator {
|
|||
await currentBoard.archive();
|
||||
}
|
||||
this.parseActions(board.actions);
|
||||
const boardId = this.createBoardAndLabels(board);
|
||||
const boardId = await this.createBoardAndLabels(board);
|
||||
this.createLists(board.lists, boardId);
|
||||
this.createSwimlanes(boardId);
|
||||
this.createCards(board.cards, boardId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue