Skip to content

Commit

Permalink
Change all occurrences of hash to version
Browse files Browse the repository at this point in the history
  • Loading branch information
loevgaard committed Apr 10, 2024
1 parent 1d8d639 commit 2f9da0d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Message/CommandHandler/RegisterWebhooksHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ public function __invoke(RegisterWebhooks $message): void
{
$this->webhookRegistrar->register();

$hash = $this->webhookRegistrar->getVersion();
$version = $this->webhookRegistrar->getVersion();

$registeredWebhooks = $this->registeredWebhooksRepository->findOneByVersion($hash);
$registeredWebhooks = $this->registeredWebhooksRepository->findOneByVersion($version);
if (null === $registeredWebhooks) {
$registeredWebhooks = $this->registeredWebhooksFactory->createNew();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Repository/RegisteredWebhooksRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class RegisteredWebhooksRepository extends EntityRepository implements Registere
{
public function findOneByVersion(string $version): ?RegisteredWebhooksInterface
{
$obj = $this->findOneBy(['hash' => $version]);
$obj = $this->findOneBy(['version' => $version]);
Assert::nullOrIsInstanceOf($obj, RegisteredWebhooksInterface::class);

return $obj;
Expand Down

0 comments on commit 2f9da0d

Please sign in to comment.