1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

fix: add missing awaits on events (#8320)

This PR adds missing awaits on the call to eventStore which were
revealed to be fire and forget when we added transactional support for
these methods.
This commit is contained in:
Fredrik Strand Oseberg 2024-10-01 14:34:25 +02:00 committed by GitHub
parent b03686dc3f
commit 4d97f59e62
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -752,7 +752,7 @@ export class AccessService {
const addedPermissions = await this.store.getPermissionsForRole(
newRole.id,
);
this.eventService.storeEvent(
await this.eventService.storeEvent(
new RoleCreatedEvent({
data: {
...newRole,
@ -803,7 +803,7 @@ export class AccessService {
const updatedPermissions = await this.store.getPermissionsForRole(
role.id,
);
this.eventService.storeEvent(
await this.eventService.storeEvent(
new RoleUpdatedEvent({
data: {
...updatedRole,
@ -846,7 +846,7 @@ export class AccessService {
const existingRole = await this.roleStore.get(id);
const existingPermissions = await this.store.getPermissionsForRole(id);
await this.roleStore.delete(id);
this.eventService.storeEvent(
await this.eventService.storeEvent(
new RoleDeletedEvent({
preData: {
...existingRole,