[local-sync] Fix transaction syntax

This commit is contained in:
Juan Tejada 2017-01-26 09:19:17 -08:00
parent 2391f58dfc
commit f98b9449bf
2 changed files with 2 additions and 2 deletions

View file

@ -49,7 +49,7 @@ class MoveThreadToFolderIMAP extends SyncbackTask {
// If IMAP succeeds, save the model updates
await sequelize.transaction(async (transaction) => {
await Promise.all(threadMessages.map(async (m) => {
await m.update({folderImapUID: null}, transaction)
await m.update({folderImapUID: null}, {transaction})
await m.setFolder(targetFolder, {transaction})
}))
await thread.setFolders([targetFolder], {transaction})

View file

@ -53,7 +53,7 @@ class SetThreadFolderAndLabelsIMAP extends SyncbackTask {
// If IMAP succeeds, save the model updates
await sequelize.transaction(async (transaction) => {
await Promise.all(threadMessages.map(async (m) => {
await m.update({folderImapUID: null}, transaction)
await m.update({folderImapUID: null}, {transaction})
await m.setLabels(labelIds, {transaction})
await m.setFolder(targetFolder, {transaction})
}))