From 4d97f59e62b74f8ac05853990c364115ace2def8 Mon Sep 17 00:00:00 2001 From: Fredrik Strand Oseberg Date: Tue, 1 Oct 2024 14:34:25 +0200 Subject: [PATCH] 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. --- src/lib/services/access-service.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/services/access-service.ts b/src/lib/services/access-service.ts index 12023cdba6..af05b9a772 100644 --- a/src/lib/services/access-service.ts +++ b/src/lib/services/access-service.ts @@ -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,