Fixed transaction completion error on collection update

refs https://github.com/TryGhost/Arch/issues/16

- Without an extra await in the update function the passed in transaction would complete before all updates had a chance to run within this transaction.
This commit is contained in:
Naz 2023-08-01 14:19:38 +08:00 committed by naz
parent fe4c0b18cf
commit aaf0998129

View File

@ -368,7 +368,7 @@ export class CollectionsService {
return;
}
this.updatePostsInCollections(postIds, collections, transaction);
await this.updatePostsInCollections(postIds, collections, transaction);
});
}
@ -386,7 +386,7 @@ export class CollectionsService {
return;
}
this.updatePostsInCollections(postIds, collections, transaction);
await this.updatePostsInCollections(postIds, collections, transaction);
});
}