Skip to content

Commit

Permalink
Merge branch 'main' into PPF-468-nullable-website
Browse files Browse the repository at this point in the history
  • Loading branch information
LucWollants authored May 22, 2024
2 parents 107a64d + 46caa3b commit 4ceb51f
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 50 deletions.
12 changes: 4 additions & 8 deletions app/Auth0/Listeners/UpdateClients.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,16 @@ 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);

$this->logger->info(
'Auth0 client(s) updated',
[
'domain' => 'auth0',
'integration_id' => $integrationId->toString(),
'integration_id' => $event->id->toString(),
]
);
}
Expand All @@ -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,
]);
}
Expand Down
17 changes: 0 additions & 17 deletions app/Domain/Integrations/Events/ClientActivated.php

This file was deleted.

17 changes: 0 additions & 17 deletions app/Domain/Integrations/Events/ClientBlocked.php

This file was deleted.

2 changes: 1 addition & 1 deletion app/Domain/Integrations/Events/IntegrationUrlCreated.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ final class IntegrationUrlCreated

public function __construct(
public readonly UuidInterface $id,
public readonly UuidInterface $integrationId
public readonly UuidInterface $integrationUrlId,
) {
}
}
2 changes: 1 addition & 1 deletion app/Domain/Integrations/Events/IntegrationUrlDeleted.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ final class IntegrationUrlDeleted

public function __construct(
public readonly UuidInterface $id,
public readonly UuidInterface $integrationId,
public readonly UuidInterface $integrationUrlId,
) {
}
}
2 changes: 1 addition & 1 deletion app/Domain/Integrations/Events/IntegrationUrlUpdated.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ final class IntegrationUrlUpdated

public function __construct(
public readonly UuidInterface $id,
public readonly UuidInterface $integrationId,
public readonly UuidInterface $integrationUrlId,
) {
}
}
6 changes: 3 additions & 3 deletions app/Domain/Integrations/Models/IntegrationUrlModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,20 @@ protected static function booted(): void
{
self::created(
static fn (IntegrationUrlModel $integrationUrlModel) => 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)
)
);
}
Expand Down
4 changes: 2 additions & 2 deletions app/Insightly/Objects/Role.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

enum Role: string
{
case Technical = 'Technisch';
case Applicant = 'Aanvrager';
case Technical = 'Technisch contact';
case Applicant = 'Inhoudelijk contact';
}

0 comments on commit 4ceb51f

Please sign in to comment.