mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-14 00:24:33 +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
|
// If IMAP succeeds, save the model updates
|
||||||
await sequelize.transaction(async (transaction) => {
|
await sequelize.transaction(async (transaction) => {
|
||||||
await Promise.all(threadMessages.map(async (m) => {
|
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 m.setFolder(targetFolder, {transaction})
|
||||||
}))
|
}))
|
||||||
await thread.setFolders([targetFolder], {transaction})
|
await thread.setFolders([targetFolder], {transaction})
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ class SetThreadFolderAndLabelsIMAP extends SyncbackTask {
|
||||||
// If IMAP succeeds, save the model updates
|
// If IMAP succeeds, save the model updates
|
||||||
await sequelize.transaction(async (transaction) => {
|
await sequelize.transaction(async (transaction) => {
|
||||||
await Promise.all(threadMessages.map(async (m) => {
|
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.setLabels(labelIds, {transaction})
|
||||||
await m.setFolder(targetFolder, {transaction})
|
await m.setFolder(targetFolder, {transaction})
|
||||||
}))
|
}))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue