mirror of
https://github.com/plankanban/planka.git
synced 2025-08-09 07:25:24 +02:00
revert: ⏪ undo dev change
This commit is contained in:
parent
0e79684f05
commit
1bdab239b5
1 changed files with 2 additions and 20 deletions
|
@ -82,12 +82,8 @@ module.exports = {
|
|||
const importComments = async (plankaCard, trelloCard) => {
|
||||
const trelloComments = getTrelloCommentsOfCard(trelloCard.id);
|
||||
trelloComments.sort((a, b) => new Date(a.date).getTime() - new Date(b.date).getTime());
|
||||
if (trelloCard.id === '64e5c9be1f2b91b351be443b') {
|
||||
console.log(trelloComments);
|
||||
}
|
||||
console.log('trelloComments', trelloComments.length);
|
||||
|
||||
const result = Promise.allSettled(
|
||||
return Promise.all(
|
||||
trelloComments.map(async (trelloComment) => {
|
||||
return Action.create({
|
||||
cardId: plankaCard.id,
|
||||
|
@ -98,23 +94,9 @@ module.exports = {
|
|||
`${trelloComment.data.text}\n\n---\n*Note: imported comment, originally posted by ` +
|
||||
`\n${trelloComment.memberCreator.fullName} (${trelloComment.memberCreator.username}) on ${trelloComment.date}*`,
|
||||
},
|
||||
})
|
||||
.fetch()
|
||||
.catch((err) => {
|
||||
console.log('err', err);
|
||||
});
|
||||
}).fetch();
|
||||
}),
|
||||
);
|
||||
const res = await result;
|
||||
if (res.length > 0) {
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
if (res[i].status === 'rejected') {
|
||||
console.log('res[i].reason', res[i].reason);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
const importCards = async (plankaList, trelloList) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue