mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-11 10:38:11 +08:00
[local-sync] Fix transaction syntax
This commit is contained in:
parent
2391f58dfc
commit
f98b9449bf
2 changed files with 2 additions and 2 deletions
|
@ -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})
|
||||
|
|
|
@ -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})
|
||||
}))
|
||||
|
|
Loading…
Reference in a new issue