diff --git a/app/Auth0/Listeners/UpdateClients.php b/app/Auth0/Listeners/UpdateClients.php index 32e71fc8b..ae16707db 100644 --- a/app/Auth0/Listeners/UpdateClients.php +++ b/app/Auth0/Listeners/UpdateClients.php @@ -31,10 +31,8 @@ public function __construct( public function handle( IntegrationUpdated|IntegrationUrlCreated|IntegrationUrlDeleted|IntegrationUrlUpdated $event ): void { - $integrationId = $event->integrationId ?? $event->id; - - $integration = $this->integrationRepository->getById($integrationId); - $auth0Clients = $this->auth0ClientRepository->getByIntegrationId($integrationId); + $integration = $this->integrationRepository->getById($event->id); + $auth0Clients = $this->auth0ClientRepository->getByIntegrationId($event->id); $this->clusterSDK->updateClientsForIntegration($integration, ...$auth0Clients); @@ -42,7 +40,7 @@ public function handle( 'Auth0 client(s) updated', [ 'domain' => 'auth0', - 'integration_id' => $integrationId->toString(), + 'integration_id' => $event->id->toString(), ] ); } @@ -51,10 +49,8 @@ public function failed( IntegrationUpdated|IntegrationUrlCreated|IntegrationUrlDeleted|IntegrationUrlUpdated $event, Throwable $throwable ): void { - $integrationId = $event->integrationId ?? $event->id; - $this->logger->error('Failed to update Auth0 client(s)', [ - 'integration_id' => $integrationId->toString(), + 'integration_id' => $event->id->toString(), 'exception' => $throwable, ]); } diff --git a/app/Domain/Integrations/Events/ClientActivated.php b/app/Domain/Integrations/Events/ClientActivated.php deleted file mode 100644 index a9fd2b4c8..000000000 --- a/app/Domain/Integrations/Events/ClientActivated.php +++ /dev/null @@ -1,17 +0,0 @@ - IntegrationUrlCreated::dispatch( + Uuid::fromString($integrationUrlModel->integration_id), Uuid::fromString($integrationUrlModel->id), - Uuid::fromString($integrationUrlModel->integration_id) ) ); self::updated( static fn (IntegrationUrlModel $integrationUrlModel) => IntegrationUrlUpdated::dispatch( + Uuid::fromString($integrationUrlModel->integration_id), Uuid::fromString($integrationUrlModel->id), - Uuid::fromString($integrationUrlModel->integration_id) ) ); self::deleted( static fn (IntegrationUrlModel $integrationUrlModel) => IntegrationUrlDeleted::dispatch( + Uuid::fromString($integrationUrlModel->integration_id), Uuid::fromString($integrationUrlModel->id), - Uuid::fromString($integrationUrlModel->integration_id) ) ); } diff --git a/app/Insightly/Objects/Role.php b/app/Insightly/Objects/Role.php index 52c362711..30e7b7085 100644 --- a/app/Insightly/Objects/Role.php +++ b/app/Insightly/Objects/Role.php @@ -6,6 +6,6 @@ enum Role: string { - case Technical = 'Technisch'; - case Applicant = 'Aanvrager'; + case Technical = 'Technisch contact'; + case Applicant = 'Inhoudelijk contact'; }