Skip to content

Commit

Permalink
Update IntegrationUrl changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Koen Eelen committed May 22, 2024
1 parent 97faf99 commit c20879e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 18 deletions.
5 changes: 0 additions & 5 deletions app/Domain/Integrations/Events/IntegrationUrlCreated.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,4 @@ public function __construct(
public readonly UuidInterface $integrationUrlId,
) {
}

public function getIntegrationId(): UuidInterface
{
return $this->integrationId;
}
}
5 changes: 0 additions & 5 deletions app/Domain/Integrations/Events/IntegrationUrlDeleted.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,4 @@ public function __construct(
public readonly UuidInterface $integrationUrlId,
) {
}

public function getIntegrationId(): UuidInterface
{
return $this->integrationId;
}
}
5 changes: 0 additions & 5 deletions app/Domain/Integrations/Events/IntegrationUrlUpdated.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,4 @@ public function __construct(
public readonly UuidInterface $integrationUrlId,
) {
}

public function getIntegrationId(): UuidInterface
{
return $this->integrationId;
}
}
6 changes: 3 additions & 3 deletions app/Keycloak/Listeners/UpdateClients.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public function __construct(

public function handle(IntegrationUpdated|IntegrationUrlCreated|IntegrationUrlUpdated|IntegrationUrlDeleted $event): void
{
$integration = $this->integrationRepository->getById($event->getIntegrationId());
$keycloakClients = $this->keycloakClientRepository->getByIntegrationId($event->getIntegrationId());
$integration = $this->integrationRepository->getById($event->id);
$keycloakClients = $this->keycloakClientRepository->getByIntegrationId($event->id);
$scopeId = $this->scopeConfig->getScopeIdFromIntegrationType($integration);

foreach ($keycloakClients as $keycloakClient) {
Expand All @@ -54,7 +54,7 @@ public function handle(IntegrationUpdated|IntegrationUrlCreated|IntegrationUrlUp
public function failed(IntegrationUpdated|IntegrationUrlCreated|IntegrationUrlUpdated|IntegrationUrlDeleted $integrationUpdated, Throwable $throwable): void
{
$this->logger->error('Failed to update Keycloak client(s)', [
'integration_id' => $integrationUpdated->getIntegrationId()->toString(),
'integration_id' => $integrationUpdated->id->toString(),
'exception' => $throwable,
]);
}
Expand Down

0 comments on commit c20879e

Please sign in to comment.