Skip to content

Commit

Permalink
fix: add missing awaits on events (#8320)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
FredrikOseberg authored Oct 1, 2024
1 parent b03686d commit 4d97f59
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/services/access-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 4d97f59

Please sign in to comment.