0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Fixed createCollection not waiting for save

This can cause race conditions when writing e2e tests in the case of to the API
responding before persisting the data
This commit is contained in:
Fabien "egg" O'Carroll 2023-06-28 22:52:54 +01:00 committed by Fabien 'egg' O'Carroll
parent 283cae9a59
commit 633cecdf75

View file

@ -196,7 +196,7 @@ export class CollectionsService {
collection.addPost(post);
this.collectionsRepository.save(collection);
await this.collectionsRepository.save(collection);
return this.toDTO(collection);
}